/* 
 * Mindpulse App CSS
 * Design Direction: Editorial & Glassmorphism (Autoral)
 * Version: 3.0
 */

/* -------------------------------------------------------------------------- */
/*                                1. VARIABLES                                */
/* -------------------------------------------------------------------------- */
:root {
    /* Colors - Brand Identity Preserved */
    --c-primary: #3d3024;
    /* Deep Coffee */
    --c-secondary: #6b5d4f;
    /* Mocha */
    --c-accent: #d4a373;
    /* Terracotta */
    --c-accent-dark: #b8865c;
    --c-cream: #faf6ed;
    /* Base Cream */
    --c-white: #ffffff;

    /* Glassmorphism System */
    --glass-surface: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(61, 48, 36, 0.1);
    --glass-blur: blur(12px);

    /* Gradients */
    --grad-main: linear-gradient(135deg, #faf6ed 0%, #f5e6d3 100%);
    --grad-accent: linear-gradient(135deg, #d4a373 0%, #8b7355 100%);

    /* Typography - Editorial Style */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Radius */
    --space-unit: 8px;
    --radius-soft: 24px;
    /* Super soft, modern feel */
    --radius-pill: 9999px;
}

/* -------------------------------------------------------------------------- */
/*                                 2. BASE                                    */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--c-cream);
    /* Subtle noise texture or mesh gradient could be added here for more texture */
    background-image:
        radial-gradient(at 0% 0%, rgba(212, 163, 115, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(61, 48, 36, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    font-family: var(--font-body);
    color: var(--c-primary);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    font-weight: 400;
    /* Editorial elegance */
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--c-primary);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.75rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/*                           3. GLASS COMPONENTS                              */
/* -------------------------------------------------------------------------- */

/* The Core "Glass" Card */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-soft);
    padding: 32px;
}

/* Floating Elements */
.float-card {
    background: var(--c-white);
    border-radius: var(--radius-soft);
    box-shadow: 0 20px 40px -10px rgba(61, 48, 36, 0.1);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.float-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* -------------------------------------------------------------------------- */
/*                             4. UI ELEMENTS                                 */
/* -------------------------------------------------------------------------- */

/* Editorial Inputs */
.input-elegant {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
    border-bottom: 2px solid rgba(61, 48, 36, 0.1);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--c-primary);
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.input-elegant:focus {
    outline: none;
    background: var(--c-white);
    border-bottom-color: var(--c-accent);
    box-shadow: 0 4px 20px rgba(212, 163, 115, 0.1);
}

/* Liquid Buttons */
.btn-liquid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    background: var(--grad-accent);
    color: var(--c-white);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 100px;
    /* Pillow shape */
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(212, 163, 115, 0.4);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.btn-liquid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: 0.3s;
}

.btn-liquid:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(212, 163, 115, 0.5);
}

.btn-liquid:hover::after {
    opacity: 1;
}

/* -------------------------------------------------------------------------- */
/*                           5. AUTH / LOGIN LAYOUT                           */
/* -------------------------------------------------------------------------- */
.layout-split {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.layout-visual {
    flex: 1.2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-primary);
    /* Fallback */
}

/* Artistic Background for Visual Side */
.art-mesh-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 80% 20%, #8b7355 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, #d4a373 0%, transparent 40%),
        #3d3024;
    filter: blur(60px);
    opacity: 0.8;
}

.layout-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(250, 246, 237, 0.8);
    backdrop-filter: blur(20px);
}

/* -------------------------------------------------------------------------- */
/*                         6. DASHBOARD / APP LAYOUT                          */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/*                         6. DASHBOARD / APP LAYOUT                          */
/* -------------------------------------------------------------------------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    /* Allow growing */
    /* overflow: hidden; REMOVED to allow window scroll */
    padding: 24px;
    gap: 24px;
}

/* Floating Sidebar (Dock Style) */
.dock-sidebar {
    width: 280px;
    background: var(--glass-surface);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-soft);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--glass-shadow);
    z-index: 100;
    /* Sticky behavior for window scrolling */
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    color: var(--c-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover,
.nav-item.active {
    background: var(--c-white);
    color: var(--c-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

/* Main Content Area */
.app-main {
    flex: 1;
    border-radius: var(--radius-soft);
    /* overflow-y: auto; REMOVED */
    position: relative;
}

/* Dashboard Header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    padding-top: 10px;
}

.page-title span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--c-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

/* Stats Cards - Editorial Style */
.stat-tile {
    background: var(--c-white);
    padding: 32px;
    border-radius: var(--radius-soft);
    position: relative;
    overflow: hidden;
    transition: 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.stat-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(61, 48, 36, 0.08);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--c-primary);
    line-height: 1;
    margin: 16px 0;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--c-secondary);
}

.stat-decoration {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    color: var(--c-accent);
    opacity: 0.05;
    pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/*                              7. UTILITIES                                  */
/* -------------------------------------------------------------------------- */
.text-accent {
    color: var(--c-accent);
}

.text-serif {
    font-family: var(--font-display);
}

.shadow-float {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none;
}

/* Mobile Adaptations */
@media (max-width: 1024px) {
    .app-wrapper {
        padding: 0;
        flex-direction: column;
        gap: 0;
    }

    /* Hide Sidebar by default on mobile */
    .dock-sidebar {
        position: fixed;
        left: -320px;
        /* Fully hidden */
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        z-index: 2000;
        border-radius: 0 24px 24px 0;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        background: rgba(255, 255, 255, 0.95);
        /* Solid for readability on mobile */
        padding: 24px;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.1);
    }

    .dock-sidebar.mobile-active {
        transform: translateX(320px);
    }

    /* Show Mobile Menu Trigger */
    #mobile-menu-trigger {
        display: flex !important;
    }

    .mobile-close-btn {
        display: block !important;
    }

    .layout-split {
        flex-direction: column;
    }

    .layout-visual {
        min-height: 300px;
    }

    .app-main {
        padding: 80px 20px 20px;
        /* Top padding for the fixed button area */
        overflow: visible;
    }
}

/* -------------------------------------------------------------------------- */
/*                              8. GRID SYSTEM                                */
/* -------------------------------------------------------------------------- */
.grid {
    display: grid;
    width: 100%;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.gap-8 {
    gap: 32px;
}

@media (max-width: 1200px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-cols-3,
    .grid-cols-2,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}