/* EBMS Bootstrap 5 Custom Theme */

/* Import Bootstrap 5 */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Custom Variables */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.25);

    --border-radius: 12px;
    --border-radius-lg: 16px;
}

/* Global Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-dark);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Animated Background Carousel */
.bg-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-carousel .carousel-item {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(1.1); }
    to { opacity: 1; transform: scale(1); }
}

/* Main Container */
.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    min-height: auto;
    position: relative;
    animation: slideUp 0.6s ease-out;
    width: 95%;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headings */
h1 {
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: white;
}

.form-control[type="file"] {
    padding: 0.5rem;
    border-style: dashed;
}

.form-control[type="file"]:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: var(--danger-color);
    border: none;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Link Buttons */
.link-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem;
    text-align: center;
}

.link-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
    text-decoration: none;
}

.back-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-align: center;
    width: 100%;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Download Buttons */
.download-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 1rem auto;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
}

.download-btn i {
    margin-right: 0.5rem;
}

/* Table Styles */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    position: relative;
}

.table thead th:hover {
    cursor: pointer;
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(0, 123, 255, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Pagination */
#pagination {
    margin: 2rem 0;
}

#pagination button {
    margin: 0 0.25rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    background: var(--light-color);
    color: var(--dark-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

#pagination button:hover:not(.active) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

#pagination button.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

#pagination button:disabled {
    background: var(--secondary-color);
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading and Error States */
.loading, .error {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-weight: 600;
}

.loading {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.1);
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 1.5rem;
        max-width: 95%;
        width: auto;
    }

    h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.4rem;
    }
}

@media (max-width: 576px) {
    .container {
        margin: 0.5rem auto;
        padding: 1rem;
        max-width: 100%;
        width: calc(100% - 1rem);
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    h2, h3 {
        font-size: 1.2rem;
    }

    .form-control {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg) !important;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary) !important;
}
/* Input File */
.form-group input[type="file"] {
    max-width: 100%;
    padding: 10px;
    border-radius: 8px;
}