/* Device Form Extension Styles - untuk struktur field baru */

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Validation Styles */
.validation-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.1rem rgba(40, 167, 69, 0.25) !important;
}

.validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25) !important;
}

.validation-checking {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.25) !important;
}

.name-validation-feedback {
    margin-top: 5px;
    font-size: 0.85em;
    padding: 5px 8px;
    border-radius: 4px;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.name-validation-feedback.success {
    color: #28a745;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.name-validation-feedback.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.name-validation-feedback.checking {
    color: #007bff;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shared Modern Form Classes */
.modern-form {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modern-form .form-group {
    margin-bottom: 0;
}

.modern-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Grid Layout (Shared) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.modern-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modern-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Device Form Specific Styles */
.modern-device-form {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 12px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    padding: 0;
    width: 90vw;
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Device Form Header Styling */
.modern-device-form .form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
    position: relative;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.modern-device-form .form-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.modern-device-form .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.modern-device-form .form-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 5px 0 0 0;
    font-weight: 300;
}

.modern-device-form .modern-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modern-device-form .modern-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Device Form Body Styling */
.modern-device-form .device-form {
    padding: 30px;
}

.modern-device-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f8f9fa;
}

.modern-device-form .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    user-select: none;
}

.modern-device-form .btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.modern-device-form .btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
}

.modern-device-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modern-device-form .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a6 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.modern-device-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Grid layout for device form */
.modern-device-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.modern-device-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-device-form .form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-device-form .form-group label i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.modern-device-form .form-group input,
.modern-device-form .form-group select,
.modern-device-form .form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

.modern-device-form .form-group input:focus,
.modern-device-form .form-group select:focus,
.modern-device-form .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #f8f9ff;
}

/* Full-width fields */
.modern-device-form .full-width {
    grid-column: 1 / -1;
}

/* Form validation styling */
.modern-device-form .form-group.has-error input,
.modern-device-form .form-group.has-error select,
.modern-device-form .form-group.has-error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.modern-device-form .error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Form validation styles */
.form-group input:invalid {
    border-color: #ff6b6b;
    background-color: #fff5f5;
}

.form-group input:valid {
    border-color: #51cf66;
}

/* Device-specific field styling */
.modern-device-form input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.modern-device-form input[pattern] {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Category change animations */
.modern-device-form select {
    position: relative;
}

.modern-device-form option {
    padding: 10px;
    font-size: 0.95rem;
}

/* Loading state for device form submission */
.modern-device-form.submitting .form-actions {
    opacity: 0.6;
    pointer-events: none;
}

.modern-device-form.submitting .btn-primary::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive design for device forms */
@media (max-width: 768px) {
    .modern-device-form {
        max-width: 95vw;
        margin: 20px 10px;
    }
    
    .modern-device-form .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modern-device-form .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modern-device-form .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Legacy form validation styles (keep for backward compatibility) */
.form-group input:invalid {
    border-color: #ff6b6b;
    background-color: #fff5f5;
}

.form-group input:valid {
    border-color: #51cf66;
}

.ip-requirement {
    display: block;
    color: #ff6b6b;
    font-size: 0.85em;
    margin-top: 5px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.ip-requirement i {
    margin-right: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.readonly-field {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
    border-color: #dee2e6 !important;
    position: relative;
}

.field-hint {
    display: block;
    color: #6c757d;
    font-size: 0.75em;
    margin-top: 3px;
    font-style: italic;
}

/* Category-based styling */
.form-group select#deviceObject {
    position: relative;
}

.form-group select#deviceObject[value="ap"] {
    border-left: 4px solid #ffd43b;
    background-color: #fffbf0;
}

.form-group select#deviceObject[value="router"] {
    border-left: 4px solid #339af0;
    background-color: #f0f8ff;
}

.form-group select#deviceObject[value="server"] {
    border-left: 4px solid #51cf66;
    background-color: #f0fff4;
}

.form-group select#deviceObject[value="switch"] {
    border-left: 4px solid #ff8787;
    background-color: #fff5f5;
}

.form-group select#deviceObject[value="odp"] {
    border-left: 4px solid #9775fa;
    background-color: #f8f0ff;
}

/* Connection type styling */
.form-group select#deviceConnection option[value="lan"] {
    background-color: #f0fff4;
    color: #2d8f47;
}

.form-group select#deviceConnection option[value="fiber"] {
    background-color: #f0f8ff;
    color: #1864ab;
}

.form-group select#deviceConnection option[value="wireless"] {
    background-color: #fff4e6;
    color: #d9480f;
}

/* Enhanced form feedback */
.form-group.has-category-warning {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}

/* IP requirement indicator */
.form-group.requires-ip .form-group label::after {
    content: " *";
    color: #ff6b6b;
    font-weight: bold;
}

/* Success state for IP input */
.form-group input#deviceIP:valid {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2351cf66'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Error state for IP input */
.form-group input#deviceIP:invalid {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6b6b'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Form submission states */
.modern-form.submitting {
    opacity: 0.6;
    pointer-events: none;
}

.modern-form.submitting::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #e1e8ed;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Request Form Specific Styles */
.modern-request-form {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    /* Inherit styles dari modern-device-form */
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 12px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    padding: 0;
    width: 90vw;
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Request Form Header Styling */
.modern-request-form .form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
    position: relative;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.modern-request-form .form-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.modern-request-form .modal-title {
    margin: 0 0 4px 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.modern-request-form .form-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modern close button for request form */
.modern-request-form .modern-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modern-request-form .modern-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Request Form Body Styling */
.modern-request-form .device-form {
    padding: 30px;
}

.modern-request-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f8f9fa;
}

.modern-request-form .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    user-select: none;
}

.modern-request-form .btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.modern-request-form .btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
}

.modern-request-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modern-request-form .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a6 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.modern-request-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Grid layout for request form */
.modern-request-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.modern-request-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-request-form .form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-request-form .form-group label i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.modern-request-form .form-group input,
.modern-request-form .form-group select,
.modern-request-form .form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

.modern-request-form .form-group input:focus,
.modern-request-form .form-group select:focus,
.modern-request-form .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #f8f9ff;
}

.modern-request-form .form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Full-width fields */
.modern-request-form .full-width {
    grid-column: 1 / -1;
}

/* Section headers styling */
.modern-request-form .form-section-header {
    grid-column: 1 / -1;
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    position: relative;
}

.modern-request-form .form-section-header h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-request-form .form-section-header i {
    color: #667eea;
    font-size: 1.2rem;
}

.modern-request-form .form-section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Form validation styling */
.modern-request-form .form-group.has-error input,
.modern-request-form .form-group.has-error select,
.modern-request-form .form-group.has-error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.modern-request-form .error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive design */
@media (max-width: 768px) {
    .modern-request-form .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modern-request-form .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modern-request-form .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Form section headers - consistent with device forms */
.form-section-header {
    margin: 25px 0 15px 0;
    padding: 0;
}

.form-section-header h3 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 12px 0;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-header h3 i {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Full width form group for single fields */
.form-group.full-width {
    grid-column: 1 / -1;
    width: 100%;
}

.form-group.full-width input,
.form-group.full-width textarea,
.form-group.full-width select {
    width: 100%;
}

/* Legacy form-section support (keep for backward compatibility) */
.form-section {
    margin: 25px 0 15px 0;
    padding: 0;
}

.form-section h3 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 12px 0;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3 i {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Enhanced textarea styling for requests */
.modern-request-form textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.modern-request-form textarea:focus {
    min-height: 100px;
}

/* MAC address field styling */
.modern-request-form input[name="mac"],
.modern-request-form input[name="mac_baru"],
.modern-request-form input[name="mac_lama"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Coordinate field styling */
.modern-request-form input[name="koordinat"] {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #6c757d;
}

/* Request type specific icons and colors */
.modern-request-form[data-request-type="pasang_baru"] .form-header .form-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-request-form[data-request-type="ganti_perangkat"] .form-header .form-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.modern-request-form[data-request-type="perubahan_data"] .form-header .form-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.modern-request-form[data-request-type="migrasi"] .form-header .form-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Loading state for request submission */
.modern-request-form.submitting .form-actions {
    opacity: 0.6;
    pointer-events: none;
}

.modern-request-form.submitting .btn-primary::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced button styling for request forms */
.modern-request-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modern-request-form .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46a6 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* Media query adjustments for smaller screens */
@media (max-width: 768px) {
    .modern-request-form {
        max-width: 95vw;
        margin: 20px 10px;
    }
    
    .modern-request-form .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section h3 {
        font-size: 0.95rem;
        padding: 10px 0;
    }
}

/* Auto-Complete Styling */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #2c3e50;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    color: #667eea;
    font-weight: 500;
}

.autocomplete-item::before {
    content: "🔍 ";
    opacity: 0;
    transition: opacity 0.2s ease;
}

.autocomplete-item:hover::before,
.autocomplete-item.selected::before {
    opacity: 1;
}

/* Auto-complete active state styling */
.form-group.autocomplete-active input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group.autocomplete-active {
    z-index: 1001;
    position: relative;
}

/* Auto-complete loading state */
.autocomplete-loading {
    position: relative;
}

.autocomplete-loading::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Auto-complete icon indicator */
.form-group input[data-autocomplete="true"] {
    padding-right: 40px;
}

.form-group input[data-autocomplete="true"] + .autocomplete-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    font-size: 0.9rem;
}

.form-group.autocomplete-active input[data-autocomplete="true"] + .autocomplete-icon {
    color: #667eea;
}

/* Responsive auto-complete */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 150px;
        font-size: 0.9rem;
    }
    
    .autocomplete-item {
        padding: 10px 12px;
    }
}

/* Disabled field styling */
.disabled-field {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #e9ecef !important;
    cursor: not-allowed !important;
    font-style: italic;
}

.disabled-field::placeholder {
    color: #adb5bd !important;
    font-style: italic;
}

/* Category select styling for request forms */
.modern-request-form select[name="kategori"] {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
}

.modern-request-form select[name="kategori"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #f8f9ff;
}

.modern-request-form select[name="kategori"] option {
    padding: 8px 12px;
}

/* Enhanced form section headers */
.modern-request-form .form-section-header {
    margin: 25px 0 15px 0;
    padding: 0;
}

.modern-request-form .form-section-header h4 {
    color: #2c3e50;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    padding: 12px 0;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.modern-request-form .form-section-header h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Conditional field animations */
#macAddressGroup {
    transition: all 0.3s ease;
    overflow: hidden;
}

#macAddressGroup.hide {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

/* MAC requirement message */
.mac-requirement {
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.3s ease;
}

.mac-requirement.hidden {
    opacity: 0;
}

/* Category-based field styling */
.modern-request-form select[name="kategori"] option[value="odp"] {
    color: #ff9a56;
    font-weight: 500;
}

.modern-request-form select[name="kategori"] option[value="switch"] {
    color: #4facfe;
    font-weight: 500;
}
