@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f4f7fe;
    --sidebar-bg: rgba(255, 255, 255, 0.75);
    --card-bg: #ffffff;
    --primary-color: #1b254b;
    --accent-color: #4318ff;
    --text-main: #2b3674;
    --text-muted: #8f9bba;
    --border-color: #e9edf7;
    --shadow: 0 10px 30px rgba(112, 144, 176, 0.12);
    --shadow-hover: 0 20px 40px rgba(112, 144, 176, 0.18);
    --gradient-primary: linear-gradient(135deg, #868CFF 0%, #4318FF 100%);
    --gradient-success: linear-gradient(135deg, #05cd99 0%, #04b688 100%);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2rem 1.5rem;
    z-index: 1050;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 1040;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.nav-item:hover {
    background: #ffffff;
    color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(112, 144, 176, 0.08);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(67, 24, 255, 0.25);
}

.nav-item i {
    font-size: 1.25rem;
    margin-right: 1rem;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    padding: 3rem;
    min-height: 100vh;
    animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 55, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1045;
    transition: opacity 0.3s;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(11, 20, 55, 0.15);
    }

    .main-content {
        margin-left: 0;
        padding: 1.25rem;
        padding-top: 5.5rem;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .logo {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-top: 5rem;
    }

    .card {
        padding: 1.25rem !important;
    }

    h2.fw-bold {
        font-size: 1.5rem;
    }

    h4.fw-bold {
        font-size: 1.25rem;
    }

    h5.fw-bold {
        font-size: 1.1rem;
    }

    .table td,
    .table th {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .category-tag {
        font-size: 0.65rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styling */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(67, 24, 255, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #7c82ff 0%, #3911ec 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(67, 24, 255, 0.35);
}

.btn-success {
    background: var(--gradient-success);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(5, 205, 153, 0.25);
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #04b688 0%, #039f77 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(5, 205, 153, 0.35);
}

.btn-dark {
    background: linear-gradient(135deg, #1b254b 0%, #111c44 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(27, 37, 75, 0.25);
}

.btn-dark:hover,
.btn-dark:focus {
    background: linear-gradient(135deg, #111c44 0%, #0b1330 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(27, 37, 75, 0.35);
}

.btn-light {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(112, 144, 176, 0.08);
    transition: all 0.3s ease;
}

.btn-light:hover,
.btn-light:focus {
    background-color: #f4f7fe;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(112, 144, 176, 0.12);
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-secondary,
.btn-outline-danger {
    border-radius: 12px;
    font-weight: 600;
    border-width: 2px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    transform: translateY(-2px);
}


/* Custom Badges */
.badge {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Table Design */
.table {
    border-collapse: separate;
    border-spacing: 0 12px;
    color: var(--text-main);
}

.table tr {
    background: #fff;
    box-shadow: 0 2px 10px rgba(112, 144, 176, 0.05);
    border-radius: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.table td,
.table th {
    border: none;
    padding: 1.2rem 1rem;
    vertical-align: middle;
}

.table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    box-shadow: none;
    padding-top: 0;
    padding-bottom: 0;
}

.table tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(112, 144, 176, 0.12);
}

.table tr:hover td {
    background: transparent;
}

/* Form Styling */
.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    background-color: #f7f9ff;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.1);
}

/* Hero & Accent Components */
.card-hero {
    background: linear-gradient(135deg, #1b254b 0%, #111c44 100%);
    color: #ffffff;
    border: none;
    position: relative;
    overflow: hidden;
}

.card-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.card-hero .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card-accent-blue {
    background: linear-gradient(145deg, #f0f7ff 0%, #e6f2ff 100%);
    border: 1px solid #ddeef8;
}

.card-accent-purple {
    background: linear-gradient(145deg, #f5f3ff 0%, #ece8ff 100%);
    border: 1px solid #e2ddf8;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f4f7fe;
    color: var(--text-main);
}

/* Form & UI Polishing */
.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

/* Modal polishes */
.modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(11, 20, 55, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

.modal-header h5 {
    font-weight: 700;
    color: var(--primary-color);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

/* Toasts */
.toast {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(11, 20, 55, 0.15);
}