/* Bootstrap 5 Modern UI Enhancements */

/* Bootstrap 3 to 5 Compatibility Classes */
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { 
    display: block; 
    margin-left: auto; 
    margin-right: auto; 
}

.img-responsive { 
    max-width: 100%; 
    height: auto; 
}

.img-circle { 
    border-radius: 50%; 
}

.img-border {
    border: 1px solid #ddd;
}

/* Panel to Card migration */
.panel {
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.panel-default {
    border-color: #ddd;
}

.panel-body {
    padding: 15px;
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

/* Well to Card migration */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 0.375rem;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
}

/* Form group compatibility */
.form-group {
    margin-bottom: 1rem;
}

.control-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.help-block {
    display: block;
    margin-top: 0.25rem;
    margin-bottom: 0;
    font-size: 0.875em;
    color: #6c757d;
}

/* Button size compatibility */
.btn-xs {
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    border-radius: 0.125rem;
}

/* Label compatibility */
.label {
    display: inline;
    padding: 0.2em 0.6em 0.3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
}

.label-default { background-color: #777; }
.label-primary { background-color: #007bff; }
.label-success { background-color: #28a745; }
.label-info { background-color: #17a2b8; }
.label-warning { background-color: #ffc107; color: #212529; }
.label-danger { background-color: #dc3545; }

/* Grid system compatibility */
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6,
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
}

.col-xs-1 { width: 8.33333333%; }
.col-xs-2 { width: 16.66666667%; }
.col-xs-3 { width: 25%; }
.col-xs-4 { width: 33.33333333%; }
.col-xs-5 { width: 41.66666667%; }
.col-xs-6 { width: 50%; }
.col-xs-7 { width: 58.33333333%; }
.col-xs-8 { width: 66.66666667%; }
.col-xs-9 { width: 75%; }
.col-xs-10 { width: 83.33333333%; }
.col-xs-11 { width: 91.66666667%; }
.col-xs-12 { width: 100%; }

/* Visibility helpers */
.hidden { display: none !important; }
.show { display: block !important; }

@media (max-width: 767px) {
    .hidden-xs { display: none !important; }
    .visible-xs { display: block !important; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .hidden-sm { display: none !important; }
    .visible-sm { display: block !important; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .hidden-md { display: none !important; }
    .visible-md { display: block !important; }
}

@media (min-width: 1200px) {
    .hidden-lg { display: none !important; }
    .visible-lg { display: block !important; }
}

/* Modern Button Styles */
.btn {
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px 0 rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 6px 20px 0 rgba(102, 126, 234, 0.4);
}

/* Modern Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Modern Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Modern Form Controls */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.15s ease-in-out;
}

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

/* Modern Alert Styles */
.alert {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    color: #856404;
}

/* Modern Modal */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Modern Progress Bars */
.progress {
    border-radius: 1rem;
    background: rgba(102, 126, 234, 0.1);
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Modern Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 0.75rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.15s ease-in-out;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

/* Loading Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Modern Typography */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Responsive Spacing */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(33, 37, 41, 0.95) !important;
    }
    
    .card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .form-control {
        background: #4a5568;
        border-color: #2d3748;
        color: #e2e8f0;
    }
}