/* Common Styles - Reusable CSS */

/* Hero Section */
.hero-section-mini {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* Soft Background Colors */
.bg-primary-soft { background-color: rgba(102, 126, 234, 0.1) !important; }
.bg-success-soft { background-color: rgba(40, 167, 69, 0.1) !important; }
.bg-warning-soft { background-color: rgba(255, 193, 7, 0.1) !important; }
.bg-info-soft { background-color: rgba(23, 162, 184, 0.1) !important; }
.bg-danger-soft { background-color: rgba(220, 53, 69, 0.1) !important; }
.bg-secondary-soft { background-color: rgba(108, 117, 125, 0.1) !important; }

/* Card Styles */
.welcome-card, .content-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.welcome-card:hover, .content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

/* Table Styles */
.table-row-hover:hover {
    background-color: rgba(102, 126, 234, 0.05) !important;
}

.table-header {
    background: linear-gradient(135deg, rgba(248, 249, 250, 1) 0%, rgba(233, 236, 239, 1) 100%);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    transform: none;
}

/* Custom Input Styles - Fixed */
.custom-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    transition: all 0.3s ease;
}

.custom-input {
    width: 100%;
    padding: 1.25rem 1rem 1.25rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 1rem;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.custom-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.custom-label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #6c757d;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
    background: white;
    padding: 0 0.5rem;
}

/* Fixed: Label floating states */
.custom-input:focus + .custom-label,
.custom-input:not(:placeholder-shown) + .custom-label,
.custom-input.filled + .custom-label {
    top: 0;
    left: 2.8rem;
    font-size: 0.75rem;
    color: #667eea;
    transform: translateY(-50%);
}

.custom-input:focus ~ .input-icon,
.custom-input:not(:placeholder-shown) ~ .input-icon,
.custom-input.filled ~ .input-icon {
    color: #667eea !important;
}

.custom-input.is-invalid {
    border-color: #dc3545;
}

.custom-input.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

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

/* Empty State */
.empty-state {
    padding: 2rem 0;
}

.empty-state-wrapper {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation */
.wow {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.fadeIn {
    animation-name: fadeIn;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-input {
        padding: 1rem 0.75rem 1rem 2.5rem;
    }
    
    .input-icon {
        left: 0.75rem;
    }
    
    .custom-label {
        left: 2.5rem;
    }
    
    .custom-input:focus + .custom-label,
    .custom-input:not(:placeholder-shown) + .custom-label,
    .custom-input.filled + .custom-label {
        left: 2.3rem;
    }
}

 /* Page-specific styles only */
        .form-actions {
            background: rgba(248, 249, 250, 0.5);
            margin: 0 -2rem -2rem;
            padding: 1.5rem 2rem;
            border-radius: 0 0 1rem 1rem;
        }

        /* Password toggle button */
        .password-toggle {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #6c757d;
            cursor: pointer;
            z-index: 3;
            transition: color 0.3s ease;
        }

        .password-toggle:hover {
            color: #667eea;
        }

        /* Alert styling */
        .alert {
            border: none;
        }

        .alert-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Security tips */
        .security-tips-card {
            border: 1px solid rgba(0,0,0,0.05);
        }

        .tip-item {
            transition: all 0.3s ease;
            padding: 0.5rem;
            border-radius: 0.5rem;
        }

        .tip-item:hover {
            background-color: rgba(102, 126, 234, 0.05);
        }

        .tip-icon {
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        /* Mobile responsive */
        @media (max-width: 768px) {
            .form-actions {
                margin: 0 -1rem -1rem;
                padding: 1rem;
            }
            
            .form-actions .d-flex {
                flex-direction: column;
                gap: 1rem;
            }
            
            .action-buttons {
                text-align: center;
            }

            .password-toggle {
                right: 0.75rem;
            }
        }