:root {
    /* --- Aurora Spectrum Palette (Vibrant & Friendly) --- */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Deep Purple-Blue */
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); /* Pink-Red */
    --success-gradient: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); /* Mint-Blue */
    --warning-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%); /* Orange-Peach */
    --danger-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); /* Soft Red-Pink */
    --info-gradient: linear-gradient(120deg, #89f7fe 0%, #66a6ff 100%); /* Sky Blue */

    /* Legacy Compatibility Aliases */
    --gradient-primary: var(--primary-gradient);
    --gradient-secondary: var(--secondary-gradient);
    --gradient-success: var(--success-gradient);
    --gradient-warning: var(--warning-gradient);
    --gradient-danger: var(--danger-gradient);
    --gradient-info: var(--info-gradient);
    --gradient-accent: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);

    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4081;
    
    --bg-body: #fdfbf7; /* Warm white/cream for friendliness */
    --text-main: #2d3436;
    --text-muted: #636e72;

    /* Glassmorphism Settings */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-blur: blur(20px);
    --card-radius: 20px;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Animated Background --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(240, 240, 255, 0.5));
    overflow: hidden;
}

.ambient-bg::before, .ambient-bg::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatBlob 15s infinite alternate ease-in-out;
}

.ambient-bg::before {
    background: var(--primary-gradient);
    top: -10%;
    left: -10%;
}

.ambient-bg::after {
    background: var(--secondary-gradient);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* --- Navigation --- */
.glass-nav {
    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.3);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 10px;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
    background: rgba(106, 17, 203, 0.1);
    color: var(--primary-color) !important;
}

/* --- Cards (Glassmorphism) --- */
.card, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--card-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-header {
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}

/* --- Buttons --- */
.btn {
    border-radius: 50px; /* Pill shape */
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
    border: none;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    color: #0f5132;
}

.btn-warning {
    background: var(--warning-gradient);
    color: #664d03;
}

.btn-danger {
    background: var(--danger-gradient);
    color: #842029;
}

.btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: var(--text-muted);
    background: white;
}

.btn-outline-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: white;
}

/* --- Form Elements --- */
.form-control, .form-select {
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    background: white;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(37, 117, 252, 0.15);
}

.input-group-text {
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
}

/* --- Tables --- */
.table {
    border-collapse: separate;
    border-spacing: 0 8px; /* Space between rows */
    background: transparent;
}

.table thead th {
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s;
    border-radius: 10px;
}

.table tbody tr td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    z-index: 10;
    position: relative;
    background: #fdfdfd;
}

.table td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

/* --- Badges --- */
.badge {
    border-radius: 50px;
    padding: 0.5em 0.8em;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Modals --- */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.5));
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700;
    color: var(--primary-color);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: none;
    background: rgba(0,0,0,0.02);
    padding: 1.5rem 2rem;
}

/* --- Mobile Menu (Offcanvas) --- */
.offcanvas {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
}

.offcanvas-header {
    background: rgba(255, 255, 255, 0.5);
}

/* Floating Action Button */
.btn-primary-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
    transition: transform 0.3s;
}

.btn-primary-gradient:hover {
    transform: scale(1.1) rotate(90deg);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .table tbody tr {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Staggered animation delay for list items/rows */
.table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.table tbody tr:nth-child(2) { animation-delay: 0.15s; }
.table tbody tr:nth-child(3) { animation-delay: 0.2s; }
.table tbody tr:nth-child(4) { animation-delay: 0.25s; }
.table tbody tr:nth-child(5) { animation-delay: 0.3s; }

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
 
::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* --- Mobile Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    display: none; /* Hidden on desktop */
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    padding: 0 10px;
}

.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s;
    width: 60px;
}

.nav-item-mobile i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: transform 0.2s;
}

.nav-item-mobile.active, .nav-item-mobile:hover {
    color: var(--primary-color);
}

.nav-item-mobile.active i {
    transform: translateY(-2px);
}

.nav-item-mobile-center {
    position: relative;
    top: -25px; /* Lift center button */
}

.nav-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.nav-fab:hover {
    transform: scale(1.1) rotate(5deg);
    color: white;
    box-shadow: 0 12px 20px rgba(102, 126, 234, 0.5);
}

@media (max-width: 991.98px) {
    .bottom-nav {
        display: flex;
    }
    .glass-nav {
        display: none !important;
    }
    body {
        padding-bottom: 80px; /* Space for bottom nav */
    }
}
