/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Funky Vibrant Palette */
    --primary: #6D28D9;
    /* Deep Vibrant Purple */
    --primary-hover: #5B21B6;
    --primary-glow: #8B5CF6;

    --secondary: #FDE047;
    /* Funky Yellow */
    --secondary-hover: #FACC15;

    --accent: #F472B6;
    /* Pop Pink */
    --accent-glow: #F9A8D4;

    --neon-blue: #06B6D4;

    --success: #A3E635;
    /* Acid Green */
    --danger: #FB7185;

    --text-main: #0F172A;
    /* Slate Ink */
    --text-muted: #64748B;

    --bg-body: #F4F1EE;
    /* Warm sophisticated cream */
    --bg-surface: #FFFFFF;

    --border-color: #E2E8F0;

    --shadow-funky: 6px 6px 0px rgba(15, 23, 42, 1);
    --shadow-funky-sm: 3px 3px 0px rgba(15, 23, 42, 1);
    --shadow-funky-hover: 2px 2px 0px rgba(15, 23, 42, 1);

    --border-radius: 20px;
    --pill-radius: 9999px;

    --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy transition */
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    /* Funky faint dot pattern */
    background-image: radial-gradient(rgba(109, 40, 217, 0.1) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Headings use Space Grotesk */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.03em;
}

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

/* Utilities */
.text-primary {
    color: var(--primary) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-light {
    background-color: var(--bg-body) !important;
}

.text-center {
    text-align: center !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-2 {
    gap: 0.75rem !important;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-right: 2px solid var(--text-main);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand-desktop .logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 2px 4px 12px rgba(109, 40, 217, 0.3);
    transform: rotate(-5deg);
    border: 2px solid var(--text-main);
}

.sidebar-brand-desktop span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    /* Pop */
    letter-spacing: -1px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

/* Hover - Explicit bold border for sidebar */
.nav-link:hover {
    background-color: var(--bg-surface);
    color: var(--text-main);
    transform: translateX(6px);
    border: 2px solid var(--text-main);
    box-shadow: 4px 4px 0px var(--text-main);
}

.nav-link.active {
    background: var(--bg-surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 4px 4px 0px var(--primary);
}

.nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

/* Top Navbar */
.top-navbar {
    height: 80px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 90;
}

.navbar-brand a {
    display: none;
}

.mobile-logo {
    display: none !important;
}

.navbar-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.search-bar {
    position: relative;
    width: 380px;
}

.search-bar i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1.25rem 0.8rem 3rem;
    border: 2px solid var(--text-main);
    border-radius: var(--pill-radius);
    background-color: var(--bg-surface);
    font-family: 'Outfit';
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-funky-sm);
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    box-shadow: var(--shadow-funky);
    transform: translateY(-3px);
}

/* User Profile with Dropdown logic */
.user-profile {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    background: var(--bg-surface);
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: var(--pill-radius);
    border: 2px solid var(--text-main);
    box-shadow: var(--shadow-funky-sm);
    transition: var(--transition);
}

.dropdown-trigger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-funky);
    background-color: var(--secondary);
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.75rem;
    border: 2px solid var(--text-main);
}

.user-profile .user-name {
    font-family: 'Space Grotesk';
    font-weight: 700;
    font-size: 1rem;
}

/* The actual Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 240px;
    background: var(--bg-surface);
    border: 3px solid var(--text-main);
    border-radius: 16px;
    box-shadow: 6px 6px 0px var(--text-main);
    padding: 0.75rem;
    display: none;
    /* hidden normally */
    z-index: 1000;
}

/* This active class is toggled by JS */
.dropdown.active .dropdown-menu {
    display: block;
    animation: bounceIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    0% {
        transform: translateY(-10px) scale(0.9);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.dropdown-header {
    padding: 0.5rem 1rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    border: 2px solid transparent;
}

.dropdown-item:hover {
    background: var(--bg-body);
    border: 2px solid var(--text-main);
    color: var(--text-main);
    transform: translateX(4px);
    box-shadow: 3px 3px 0px var(--text-main);
}

.dropdown-item.text-danger:hover {
    background: #FFE4E6;
    border-color: var(--danger);
    box-shadow: 3px 3px 0px var(--danger);
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-family: 'Space Grotesk';
    font-size: 1rem;
    font-weight: 800;
    border-radius: var(--pill-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--secondary);
    /* Funky Yellow */
    color: var(--text-main);
    border: 2px solid var(--text-main);
    box-shadow: var(--shadow-funky);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(2px) translateX(2px);
    box-shadow: var(--shadow-funky-hover);
}

/* Auth Page specific */
.auth-page {
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    z-index: 10;
    position: relative;
}

.auth-card {
    background: var(--bg-surface);
    border-radius: 32px;
    box-shadow: 8px 8px 0px var(--text-main);
    padding: 3.5rem 2.5rem;
    border: 3px solid var(--text-main);
    position: relative;
    z-index: 2;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header .logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    border: 3px solid var(--text-main);
    box-shadow: 4px 4px 0px var(--text-main);
    transform: rotate(10deg);
}

.auth-header h2 {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 1.05rem;
    font-family: 'Outfit';
    font-weight: 600;
    color: var(--text-muted);
}

/* Forms overrides for funky */
.form-group label {
    font-family: 'Space Grotesk';
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.form-control {
    padding: 1rem 1.25rem 1rem 1rem;
    font-size: 1.05rem;
    border: 3px solid var(--text-main);
    border-radius: 16px;
    box-shadow: 3px 3px 0px var(--text-main);
    font-weight: 600;
    margin: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-funky-sm);
    transform: translateY(-3px);
}

.input-icon-wrapper .input-icon {
    left: 1.25rem;
    color: var(--text-main);
    font-size: 1.25rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--text-main);
    border-radius: 6px;
}

/* Funky Blobs */
.blob {
    position: absolute;
    filter: blur(10px);
    z-index: -1;
    border-radius: 50%;
    animation: bounce 8s infinite alternate;
}

.shape-1 {
    top: -5%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    border: 4px solid var(--text-main);
}

.shape-2 {
    bottom: -5%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--primary);
    border: 4px solid var(--text-main);
    animation-delay: -4s;
}

@keyframes bounce {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        transform: translateY(-50px) rotate(45deg) scale(1.1);
    }
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: 110px 2.5rem 2.5rem 2.5rem;
    flex: 1;
    min-height: 100vh;
}

/* Responsive constraints */
.d-mobile-only {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .d-mobile-only {
        display: flex !important;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        width: 260px;
        padding: 1.5rem 1rem;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0px 0px rgba(0, 0, 0, 0.1);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .top-navbar {
        left: 0;
        padding: 0 1.5rem;
        justify-content: space-between;
    }

    .main-content {
        margin-left: 0;
        padding: 110px 1.5rem 1.5rem 1.5rem;
    }

    .navbar-menu {
        justify-content: flex-end;
        width: auto;
    }

    .search-bar {
        display: none;
    }

    .mobile-logo {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
    }

    .user-name.d-none.d-sm-block {
        display: none;
    }

    /* Hide user name on small screens */

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

/* =========================================
   DASHBOARD INDEX SPECIFIC STYLES
   ========================================= */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
}

.dashboard-title-area h2 {
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 2px 2px 0px var(--text-main);
}

.dashboard-title-area p {
    font-size: 1.1rem;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    border: 3px solid var(--text-main);
    box-shadow: var(--shadow-funky);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px var(--text-main);
}

.stat-card.c-purple {
    background: #E9D5FF;
}

.stat-card.c-pink {
    background: #FBCFE8;
}

.stat-card.c-cyan {
    background: #CFFAFE;
}

.stat-card.c-lime {
    background: #D9F99D;
}

.stat-icon {
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 6rem;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.stat-value {
    font-size: 3rem;
    font-family: 'Space Grotesk';
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.stat-label {
    font-family: 'Space Grotesk';
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-main);
}

.stat-trend {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    padding: 0.4rem 0.8rem;
    border-radius: var(--pill-radius);
    border: 2px solid var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.card {
    background: var(--bg-surface);
    border-radius: 24px;
    border: 3px solid var(--text-main);
    box-shadow: var(--shadow-funky);
    overflow: hidden;
}

.card-header {
    background: var(--primary-light);
    padding: 1.5rem;
    border-bottom: 3px solid var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-family: 'Space Grotesk';
    font-size: 1.4rem;
    font-weight: 800;
}

.card-body {
    padding: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-family: 'Space Grotesk';
    padding: 1rem;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom: 3px solid var(--text-main);
}

.table td {
    padding: 1.25rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--pill-radius);
    font-family: 'Space Grotesk';
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    border: 2px solid var(--text-main);
    box-shadow: 2px 2px 0px var(--text-main);
}

.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--secondary);
}

.badge-info {
    background: var(--neon-blue);
    color: white;
}

.progress-item {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: 'Space Grotesk';
    font-weight: 700;
    font-size: 1rem;
}

.progress-bar-bg {
    width: 100%;
    height: 20px;
    background: var(--bg-body);
    border: 2px solid var(--text-main);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-right: 2px solid var(--text-main);
}


/* =========================================
   PROFILE INDEX SPECIFIC STYLES
   ========================================= */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .settings-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

.settings-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .settings-menu {
        width: 260px;
        position: sticky;
        top: 110px;
    }
}

.settings-nav-item {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-muted);
    border-radius: 14px;
    transition: var(--transition);
    border: 3px solid transparent;
}

.settings-nav-item:hover {
    background: var(--bg-surface);
    color: var(--text-main);
    transform: translateX(6px);
    border-color: var(--text-main);
    box-shadow: 4px 4px 0px var(--text-main);
}

.settings-nav-item.active {
    background: var(--bg-surface);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 4px 4px 0px var(--primary);
}

.settings-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
}

.profile-card {
    background: var(--bg-surface);
    border: 3px solid var(--text-main);
    border-radius: 24px;
    box-shadow: var(--shadow-funky);
    overflow: hidden;
    margin-top: 1rem;
}

.profile-card-header {
    padding: 1.75rem 2.5rem;
    border-bottom: 3px solid var(--text-main);
    background: var(--bg-surface);
}

.profile-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 800;
}

.profile-card-header p {
    margin: 0.35rem 0 0 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
}

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

.profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--text-main);
    box-shadow: 4px 4px 0px var(--primary);
}

.profile-avatar-info h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.profile-avatar-info p {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-split {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Global fix for headers */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}