/* Global brand colors - Modern Purple & Blue Theme */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --muted-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

/* Navbar Styling */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.navbar-brand {
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
}

/* Sidebar Styling */
.sidebar {
    background: var(--gradient-primary);
    border-right: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 76px);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 76px;
    height: fit-content;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
}

.sidebar h5 {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar h5 i {
    font-size: 1.2rem;
}

.sidebar .nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .nav-item {
    margin-bottom: 0.5rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #fff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    text-decoration: none;
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link.active::before {
    transform: scaleY(1);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom: none;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
}

.stat-card.border-primary::before {
    background: var(--gradient-primary);
}

.stat-card.border-success::before {
    background: var(--gradient-success);
}

.stat-card.border-warning::before {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.stat-card.border-danger::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card .stat-icon {
    opacity: 0.2;
    font-size: 3rem;
    position: relative;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.btn-danger {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-outline-primary {
    border-radius: 12px;
    border-width: 2px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* Table Styling */
.table {
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
}

.table thead {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    transform: scale(1.01);
}

/* Badge */
.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: var(--accent-color);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left-color: var(--primary-color);
    color: #1e40af;
}

/* Auth Card */
.auth-card {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: none;
    overflow: hidden;
    background: var(--card-bg);
}

.auth-card .card-body {
    padding: 2.5rem;
}

/* Catalog Card */
.catalog-card {
    transition: all 0.4s ease;
    height: 100%;
}

.catalog-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25);
}

.catalog-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.catalog-card .card-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.catalog-card .btn {
    border-radius: 12px;
    margin-top: auto;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

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

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef1f7;
}

.welcome-section h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* User Avatar */
.user-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Quick Action Cards */
.quick-action-card {
    transition: all 0.3s ease;
    border: 1px solid #eef1f7;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.quick-action-icon.bg-primary {
    background: var(--gradient-primary);
}

.quick-action-icon.bg-success {
    background: var(--gradient-success);
}

.quick-action-icon.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Enhanced Stat Cards */
.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card h2 {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-card h6 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Table Enhancements */
.table code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

/* Alert Enhancements */
.alert i {
    margin-right: 8px;
}

/* Card Header Enhancements */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.card-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Empty State */
.table tbody td.text-center {
    padding: 3rem 1rem;
}

.table tbody td.text-center i {
    display: block;
    margin-bottom: 1rem;
}

