/* Global Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --sidebar-width: 280px;
    --sidebar-bg: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Landing Page Styles */
.landing-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-section {
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%);
    overflow: hidden;
}

.hero-section::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 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.3) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.logo-container i {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-custom {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card h3 {
    font-size: 2rem;
    color: white;
}

.stat-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.login-card .form-control {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* Features Section */
.features-section {
    padding: 5rem 0;
}

.feature-box {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon {
    transform: scale(1.1);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 30px;
    margin-right: 0.75rem;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.sidebar-nav .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    font-weight: 600;
}

.nav-divider {
    padding: 1rem 1.5rem 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: #f8f9fa;
    padding-top: 70px; /* Space for fixed navbar */
}

.top-navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.top-navbar .btn {
    white-space: nowrap;
    min-width: fit-content;
}

.top-navbar .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.content-wrapper {
    padding: 2rem;
}

/* Modern Top Navbar */
.top-navbar-modern {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 70px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: left 0.3s ease;
}

.navbar-container {
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand-name {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navbar Center - Search */
.navbar-center {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
    min-width: 0;
}

.navbar-search {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: none;
    background: #f3f4f6;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: #e5e7eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Navbar Right */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    height: 100%;
}

.navbar-icon-item {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-button {
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: #374151;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.icon-button:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.icon-button:active {
    transform: scale(0.95);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Profile Dropdown */
.navbar-profile-dropdown {
    position: relative;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    height: 100%;
}

.profile-button {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    padding: 0.5rem 0.875rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: auto;
}

.profile-button:hover {
    background: #f3f4f6;
}

.profile-button:active {
    transform: scale(0.98);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.profile-button:hover .profile-avatar {
    border-color: var(--primary-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-weight: 600;
    color: #1f2937;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    line-height: 1.2;
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1050;
}

.profile-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user-role {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.dropdown-item.logout-item {
    color: var(--danger-color);
    border-top: 1px solid #e5e7eb;
}

.dropdown-item.logout-item:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Sidebar Footer Update */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-footer-info {
    text-align: center;
}

/* Dashboard Cards */
.stat-card-modern {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid;
}

.stat-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card-modern.primary {
    border-left-color: var(--primary-color);
}

.stat-card-modern.success {
    border-left-color: var(--success-color);
}

.stat-card-modern.warning {
    border-left-color: var(--warning-color);
}

.stat-card-modern.danger {
    border-left-color: var(--danger-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Tables */
.table-modern {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-modern table {
    margin-bottom: 0;
}

.table-modern thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.table-modern thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f3f4f6;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Cards */
.card-modern {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: none;
    overflow: hidden;
}

.card-modern .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

/* Mobile Responsive */
.mobile-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-navbar-modern {
        left: 0;
    }
    
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-center {
        display: none;
    }
    
    .navbar-right {
        gap: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .brand-name {
        display: none;
    }
    
    .navbar-profile-dropdown {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .profile-button {
        padding: 0.25rem 0.5rem;
    }
    
    .icon-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .profile-dropdown-menu {
        width: 280px;
        right: -10px;
    }
    
    .profile-dropdown-menu::before {
        right: 30px;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Badge Styles */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 3rem 2rem 8rem;
    position: relative;
}

.profile-avatar {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-body {
    padding: 5rem 2rem 2rem;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

