:root {
    /* Color Palette - Logo Brand Identity */
    --primary: #0075E6;
    /* Brand Blue */
    --primary-gradient: linear-gradient(135deg, #0075E6 0%, #005bb5 100%);
    /* Blue to Dark Blue */
    --secondary: #353535;
    /* Brand Dark Grey */
    --background: #f8fafc;
    /* Soft Blue-Grey Background */
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text-main: #353535;
    /* Using Secondary for Main Text */
    --text-muted: #64748b;
    --border: #e2e8f0;

    /* Vibrant Accents */
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-teal: #14b8a6;
    --accent-pink: #ec4899;

    /* Spacing & Layout */
    --radius-sm: 8px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    /* Neutral shadow */

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography and Links */
a {
    text-decoration: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* Utilities */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Mobile Specifics */
.app-container {
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--background);
    padding-bottom: 90px;
    box-shadow: none;
}

@media (min-width: 1024px) {
    .app-container {
        padding-bottom: 0;
    }
}

.app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* Sidebar Styles */
.sidebar {
    /* display: none; */
    width: 280px;
    background: white;
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    flex-direction: column;
    padding: 24px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 12px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-item:hover,
.sidebar-item.active {
    background: #eff6ff;
    color: var(--primary);
}

.sidebar-item i {
    font-size: 1.25rem;
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex;
    }

    .app-container {
        padding-left: 280px;
        /* Push content for sidebar */
    }

    .app-header {
        left: 280px;
        /* Adjust header position */
        width: calc(100% - 280px);
    }

    .bottom-nav {
        display: none !important;
    }

    /* Utility to remove sidebar offset for login/auth pages */
    .app-container.no-sidebar {
        padding-left: 0 !important;
        display: flex;
        /* Ensure centering works if flex is used */
        align-items: center;
        /* Center vertically */
    }
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px 24px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 100;
    border-radius: 24px 24px 0 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
    width: 60px;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
    transition: transform 0.2s, color 0.2s;
}

.nav-fab-container {
    position: relative;
}

.nav-fab {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0075E6 0%, #005bb5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 117, 230, 0.4);
    border: 4px solid var(--background);
    transition: transform 0.2s;
}

.nav-fab:active {
    transform: scale(0.95);
}

.nav-item.active {
    color: var(--primary);
    background: transparent;
}

.nav-item.active i {
    transform: translateY(-2px);
    color: var(--primary);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Fancy Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: var(--space-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.balance-card {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-lg);
    border: none;
    position: relative;
    z-index: 1;
}

/* Abstract Shapes for Balance Card */
.balance-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: -1;
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: -1;
}

/* Vibrant Icon Boxes */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.bg-purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.bg-orange {
    background: #ffedd5;
    color: #c2410c;
}

.bg-teal {
    background: #ccfbf1;
    color: #0f766e;
}

.bg-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.bg-pink {
    background: #fce7f3;
    color: #be185d;
}

/* Quick Actions Grid */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.action-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.action-btn {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: white;
    box-shadow: var(--shadow-md);
    border: 1px solid white;
    transition: var(--transition);
}

.action-item:hover .action-btn {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

/* List Items with Color */
.activity-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef9c3;
    color: #a16207;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Inputs */
.input-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Bottom Nav Colorful Icons */
.nav-3d-icon {
    font-size: 1.6rem;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 2px rgba(37, 99, 235, 0.3));
    transition: transform 0.2s;
    margin-bottom: 2px;
}

.nav-item.active .nav-3d-icon {
    transform: scale(1.1) translateY(-2px);
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.4));
}

/* Specific Gradients per Icon */
.nav-home-icon {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-orders-icon {
    background: linear-gradient(135deg, #f472b6, #db2777);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 2px 2px rgba(219, 39, 119, 0.3));
}

.nav-cart-icon {
    background: linear-gradient(135deg, #fb923c, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 2px 2px rgba(234, 88, 12, 0.3));
}

.nav-profile-icon {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 2px 2px rgba(22, 163, 74, 0.3));
}

/* Active states override shadows */
.nav-item.active .nav-orders-icon {
    filter: drop-shadow(0 4px 6px rgba(219, 39, 119, 0.4));
}

.nav-item.active .nav-cart-icon {
    filter: drop-shadow(0 4px 6px rgba(234, 88, 12, 0.4));
}

.nav-item.active .nav-profile-icon {
    filter: drop-shadow(0 4px 6px rgba(22, 163, 74, 0.4));
}

/* Active Text Colors matching icons */
.nav-item.active.home-active span {
    color: #0ea5e9;
}

.nav-item.active.orders-active span {
    color: #db2777;
}

.nav-item.active.cart-active span {
    color: #ea580c;
}

.nav-item.active.profile-active span {
    color: #16a34a;
}