:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

[data-bs-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e1;
    --border-color: #334155;
}

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

/* App Main - Organized Layout */
.app-main {
    min-height: calc(100vh - 60px);
    padding: 16px 0;
    padding-bottom: 100px; /* Space for fixed bottom nav on all devices */
    background: var(--bg-secondary);
    flex: 1;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
}

/* Container Override - Professional Spacing */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    overflow-x: hidden;
    width: 100%;
}

@media (min-width: 576px) {
    .container {
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 992px) {
    .app-main {
        padding: 24px 0;
    }
    
    .container {
        padding: 0 32px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 40px;
    }
}

/* App Header - Mobile Style */
.app-header {
    background: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-color);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .app-header {
    background: rgba(26, 26, 26, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.app-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .app-header h1 {
    color: rgba(255, 255, 255, 0.95);
}

.app-header h1 i {
    font-size: 22px;
    color: var(--primary-color);
}

[data-bs-theme="dark"] .app-header h1 i {
    color: #818cf8;
}

/* iShopSync Logo - Gradient Green Style */
.app-header .app-logo-link,
.app-header .app-logo-link span {
    color: transparent !important;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.app-header .app-logo-link:hover,
.app-header .app-logo-link:hover span {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.app-header .app-logo-link i {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

.app-header .app-logo-link:hover i {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

[data-bs-theme="dark"] .app-header .app-logo-link,
[data-bs-theme="dark"] .app-header .app-logo-link span,
[data-bs-theme="dark"] .app-header .app-logo-link i {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

.app-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    padding: 0;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-icon:active {
    background: var(--bg-tertiary);
    transform: scale(0.95);
}

[data-bs-theme="dark"] .btn-icon {
    color: rgba(255, 255, 255, 0.8);
}

[data-bs-theme="dark"] .btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="dark"] .btn-icon:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Language Selector Styles */
.language-btn,
#languageDropdown,
#languageDropdownDesktop {
    position: relative;
    overflow: visible !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    color: transparent !important;
}

.language-btn > *:not(.language-flag) {
    display: none !important;
    font-size: 0 !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Ensure language-flag is always visible */
.language-btn .language-flag,
#languageDropdown .language-flag,
#languageDropdownDesktop .language-flag {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
    font-size: 24px !important;
}

.language-btn::before,
.language-btn::after {
    display: none !important;
    content: none !important;
}

.language-flag {
    font-size: 24px !important;
    line-height: 1 !important;
    display: block !important;
    transition: transform 0.2s ease;
    text-indent: 0 !important;
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
}

.language-btn:hover .language-flag {
    transform: scale(1.1);
}

.language-dropdown {
    min-width: 80px;
    padding: 8px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 0.5px solid var(--border-color);
    background: var(--bg-primary);
}

[data-bs-theme="dark"] .language-dropdown {
    background: rgba(26, 26, 26, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
    min-height: 48px;
    margin-bottom: 4px;
    gap: 12px;
}

.language-option:last-child {
    margin-bottom: 0;
}

.language-option.active {
    background: var(--bg-secondary);
}

[data-bs-theme="dark"] .language-option.active {
    background: rgba(255, 255, 255, 0.1);
}

.language-option:hover {
    background: var(--bg-secondary);
    transform: scale(1.02);
}

[data-bs-theme="dark"] .language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option .flag-icon {
    font-size: 28px;
    line-height: 1;
    display: block;
    flex-shrink: 0;
}

.language-option .language-code {
    display: none !important;
}

[data-bs-theme="dark"] .language-option .language-code {
    display: none !important;
}

.language-option .check-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
    color: var(--primary-color);
    background: var(--bg-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .language-option .check-icon {
    background: rgba(26, 26, 26, 0.9);
    color: #818cf8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.language-option .check-icon.invisible {
    display: none;
}

/* Desktop header button with text */
@media (min-width: 992px) {
    .app-header .btn-icon {
        width: auto;
        height: auto;
        padding: 8px 16px;
        gap: 8px;
    }
    
    .app-header .btn-icon span:not(.language-flag) {
        font-size: 14px;
        font-weight: 500;
    }
}

/* Page Header - Clean and Professional */
.page-header {
    background: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-color);
    padding: 16px;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.page-header h1 i {
    font-size: 22px;
    color: var(--primary-color);
}

.page-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
    width: 100%;
}

.page-header .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (min-width: 768px) {
    .page-header {
        padding: 20px 24px;
        margin-bottom: 24px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header h1 i {
        font-size: 26px;
    }
    
    .page-header .subtitle {
        width: auto;
        margin-top: 0;
        margin-left: auto;
    }
}



/* Cards - App Style */
.card {
    background: var(--bg-primary);
    border: 0.5px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .card {
        margin-bottom: 24px;
        border-radius: var(--radius-lg);
    }
}

.card:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.card-header {
    background: var(--bg-secondary);
    border-bottom: 0.5px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (min-width: 768px) {
    .card-header {
        padding: 20px 24px;
    }
}

.card-header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header i {
    font-size: 18px;
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

@media (min-width: 768px) {
    .card-body {
        padding: 24px;
    }
}

.card-footer {
    background: var(--bg-secondary);
    border-top: 0.5px solid var(--border-color);
    padding: 12px 16px;
}

/* List Items - App Style */
.list-item {
    background: var(--bg-primary);
    border-bottom: 0.5px solid var(--border-color);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.list-item:hover {
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
}

.list-item:active {
    background: var(--bg-secondary);
    transform: scale(0.98);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.list-item-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.list-item-action {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Stats Cards - App Style */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.stats-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.stats-card .stats-icon,
.stats-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stats-card .stats-content {
    flex: 1;
}

.stats-card .stats-value,
.stats-card h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0 0 4px 0;
}

.stats-card .stats-label,
.stats-card h6 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

@media (max-width: 768px) {
    .stats-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .stats-card .stats-icon,
    .stats-card .icon-wrapper {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .stats-card .stats-value,
    .stats-card h3 {
        font-size: 28px;
    }
}

.stats-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stats-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.stats-card-link .stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

@media (min-width: 768px) {
    .stats-card {
        padding: 24px;
        border-radius: var(--radius-lg);
    }
    
    .stats-card .icon-wrapper {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
}

.stats-content {
    flex: 1;
}

.stats-value {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.stats-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@media (min-width: 768px) {
    .stats-value {
        font-size: 32px;
    }
}

/* Buttons - App Style */
.btn {
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-height: 48px; /* iOS touch target */
    width: 100%;
}

.btn:active {
    transform: scale(0.96);
    opacity: 0.8;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    background: var(--primary-dark);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:active {
    background: rgba(99, 102, 241, 0.1);
}

.btn-outline-secondary {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline-secondary:active {
    background: var(--bg-secondary);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 40px;
    width: auto;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 17px;
    min-height: 52px;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.fab:active {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.fab i {
    font-size: 24px;
}

/* App Footer - Contains bottom navigation */
.app-footer {
    margin-top: 0;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
}

/* Bottom Navigation - Modern Mobile App Style (in footer) */
.bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0;
    z-index: 1050;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05), 0 -4px 12px rgba(0, 0, 0, 0.04);
    position: relative;
    width: 100%;
    height: 68px;
    display: flex !important;
    align-items: center;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    margin: 0;
}

[data-bs-theme="dark"] .bottom-nav {
    background: rgba(26, 26, 26, 0.95);
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.05), 0 -4px 16px rgba(0, 0, 0, 0.4);
}

.bottom-nav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    max-width: 100%;
    gap: 2px;
    position: relative;
}

/* Smooth transition when switching active states */
.bottom-nav .nav-item {
    will-change: transform, background-color, box-shadow;
}

.bottom-nav .nav-item {
    color: #64748b;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border: none !important;
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: visible;
    border-radius: 12px;
    margin: 0 1px;
    outline: none !important;
    outline-offset: 0 !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
    box-shadow: none !important;
    min-width: 0;
}

[data-bs-theme="dark"] .bottom-nav .nav-item {
    color: #94a3b8;
}

.bottom-nav .nav-item:focus,
.bottom-nav .nav-item:focus-visible,
.bottom-nav .nav-item:active,
.bottom-nav .nav-item:focus-within,
.bottom-nav .nav-item:visited {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

/* Remove any browser default focus styles */
.bottom-nav .nav-item *:focus,
.bottom-nav .nav-item *:focus-visible,
.bottom-nav .nav-item *:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Minimal ripple effect on click */
.bottom-nav .nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: var(--nav-color);
    border-radius: 0 0 2px 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.bottom-nav .nav-item.active::before {
    opacity: 1;
}

.bottom-nav .nav-item-button {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.bottom-nav .nav-item-form {
    flex: 1;
    display: flex;
    margin: 0;
    padding: 0;
}

.bottom-nav .nav-item-form button {
    width: 100%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    border: none !important;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    border-radius: 0;
    min-width: 0;
    position: relative;
    height: 100%;
    max-width: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    outline: none !important;
    outline-offset: 0 !important;
    -webkit-focus-ring-color: transparent;
    box-shadow: none !important;
}

.bottom-nav .nav-item-form button:focus,
.bottom-nav .nav-item-form button:focus-visible,
.bottom-nav .nav-item-form button:active,
.bottom-nav .nav-item-form button:focus-within,
.bottom-nav .nav-item-form button:visited {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

/* Modern color palette - Clean and minimal */
.bottom-nav .nav-item-home {
    --nav-color: #6366f1;
    --nav-color-light: rgba(99, 102, 241, 0.1);
    --nav-color-dark: rgba(99, 102, 241, 0.15);
    --nav-color-glow: rgba(99, 102, 241, 0.2);
    --nav-color-shadow: rgba(99, 102, 241, 0.1);
}

.bottom-nav .nav-item-family {
    --nav-color: #6366f1;
    --nav-color-light: rgba(99, 102, 241, 0.1);
    --nav-color-dark: rgba(99, 102, 241, 0.15);
    --nav-color-glow: rgba(99, 102, 241, 0.2);
    --nav-color-shadow: rgba(99, 102, 241, 0.1);
}

.bottom-nav .nav-item-sessions {
    --nav-color: #6366f1;
    --nav-color-light: rgba(99, 102, 241, 0.1);
    --nav-color-dark: rgba(99, 102, 241, 0.15);
    --nav-color-glow: rgba(99, 102, 241, 0.2);
    --nav-color-shadow: rgba(99, 102, 241, 0.1);
}

.bottom-nav .nav-item-budgets {
    --nav-color: #6366f1;
    --nav-color-light: rgba(99, 102, 241, 0.1);
    --nav-color-dark: rgba(99, 102, 241, 0.15);
    --nav-color-glow: rgba(99, 102, 241, 0.2);
    --nav-color-shadow: rgba(99, 102, 241, 0.1);
}

.bottom-nav .nav-item-profile {
    --nav-color: #6366f1;
    --nav-color-light: rgba(99, 102, 241, 0.1);
    --nav-color-dark: rgba(99, 102, 241, 0.15);
    --nav-color-glow: rgba(99, 102, 241, 0.2);
    --nav-color-shadow: rgba(99, 102, 241, 0.1);
}

.bottom-nav .nav-item-admin {
    --nav-color: #6366f1;
    --nav-color-light: rgba(99, 102, 241, 0.1);
    --nav-color-dark: rgba(99, 102, 241, 0.15);
    --nav-color-glow: rgba(99, 102, 241, 0.2);
    --nav-color-shadow: rgba(99, 102, 241, 0.1);
}

.bottom-nav .nav-item-admin .nav-label {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
}

.bottom-nav .nav-item-logout {
    --nav-color: #ef4444; /* Professional red - clear action */
    --nav-color-light: rgba(239, 68, 68, 0.12);
    --nav-color-dark: rgba(239, 68, 68, 0.18);
    --nav-color-glow: rgba(239, 68, 68, 0.2);
    --nav-color-shadow: rgba(239, 68, 68, 0.15);
}

.bottom-nav .nav-item-logout-btn {
    color: var(--text-secondary);
}

.bottom-nav .nav-item-logout-btn .nav-icon i {
    color: #64748b;
}

[data-bs-theme="dark"] .bottom-nav .nav-item-logout-btn .nav-icon i {
    color: #94a3b8;
}

.bottom-nav .nav-item-logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(0);
}

.bottom-nav .nav-item-logout-btn:hover .nav-icon {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1);
    box-shadow: none;
}

.bottom-nav .nav-item-logout-btn:hover .nav-icon i {
    color: #ef4444;
    transform: scale(1);
    filter: none;
}

.bottom-nav .nav-item-logout-btn:hover .nav-label {
    color: #ef4444;
    transform: none;
    font-weight: 600;
}

.bottom-nav .nav-item-more {
    --nav-color: #6b7280;
    --nav-color-light: rgba(107, 114, 128, 0.1);
    --nav-color-dark: rgba(107, 114, 128, 0.2);
}

.bottom-nav .nav-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.bottom-nav .nav-item:active .nav-icon {
    transform: scale(0.95);
}

.bottom-nav .nav-item:active .nav-icon i {
    transform: scale(0.95);
}

.bottom-nav .nav-item.active {
    color: var(--nav-color);
    background: transparent;
    transform: translateY(0);
    box-shadow: none;
}

[data-bs-theme="dark"] .bottom-nav .nav-item.active {
    box-shadow: none;
}

.bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: var(--nav-color);
    border-radius: 0 0 2px 2px;
    animation: slideDown 0.3s ease-out;
}

.bottom-nav .nav-item.active::after {
    display: none;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) scaleX(0);
        width: 0;
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
        width: 28px;
    }
}

.bottom-nav .nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 10px;
    background: transparent;
}

.bottom-nav .nav-icon i {
    font-size: 20px;
    transition: all 0.2s ease;
    color: #64748b;
    position: relative;
    z-index: 1;
    font-weight: 900;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands";
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] .bottom-nav .nav-icon i {
    color: #94a3b8;
}

.bottom-nav .nav-item.active .nav-icon {
    transform: scale(1);
    background: var(--nav-color-light);
    box-shadow: none;
    animation: none;
}

[data-bs-theme="dark"] .bottom-nav .nav-item.active .nav-icon {
    box-shadow: none;
}

.bottom-nav .nav-item.active .nav-icon i {
    color: var(--nav-color);
    filter: none;
    animation: none;
    text-shadow: none;
    font-weight: 900;
}


.bottom-nav .nav-item:not(.active) .nav-icon:hover {
    background: var(--nav-color-light);
    transform: scale(1);
    box-shadow: none;
    transition: all 0.2s ease;
}

.bottom-nav .nav-item:not(.active) .nav-icon:hover i {
    color: var(--nav-color);
    transform: scale(1);
    filter: none;
    transition: all 0.2s ease;
}

.bottom-nav .nav-label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    display: block;
    margin-top: 0;
    color: inherit;
    letter-spacing: 0;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.bottom-nav .nav-item.active .nav-label {
    color: var(--nav-color);
    font-weight: 600;
    transform: none;
    text-shadow: none;
    letter-spacing: 0;
}

/* Clean hover effect for desktop */
@media (hover: hover) {
    .bottom-nav .nav-item:hover:not(.active) {
        background: var(--nav-color-light);
        transform: translateY(0);
        transition: all 0.2s ease;
    }
    
    .bottom-nav .nav-item:hover:not(.active) .nav-label {
        color: var(--nav-color);
        transform: none;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .bottom-nav .nav-item:hover:not(.active) .nav-icon {
        transform: scale(1);
        background: var(--nav-color-light);
        box-shadow: none;
    }
    
    .bottom-nav .nav-item:hover:not(.active) .nav-icon i {
        color: var(--nav-color);
    }
    
    [data-bs-theme="dark"] .bottom-nav .nav-item:hover:not(.active) {
        background: var(--nav-color-light);
    }
    
    [data-bs-theme="dark"] .bottom-nav .nav-item:hover:not(.active) .nav-label {
        color: var(--nav-color);
    }
}

/* Ripple effect animation - Subtle and professional */
.nav-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    transform: scale(0);
    animation: rippleAnimation 0.5s ease-out;
    pointer-events: none;
    z-index: 0;
}

[data-bs-theme="dark"] .nav-ripple {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes rippleAnimation {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

.bottom-nav .dropdown-menu {
    margin-bottom: 90px;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 0.5px solid var(--border-color);
    padding: 0.5rem;
    background: var(--bg-primary);
}

.bottom-nav .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.bottom-nav .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

/* Ensure bottom nav is always visible on all devices - GLOBAL RULE */
.app-footer,
.bottom-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1050 !important;
}

/* Override any media query that might hide it */
@media (min-width: 576px) {
    .app-footer,
    .bottom-nav {
        display: flex !important;
        visibility: visible !important;
    }
}

@media (min-width: 768px) {
    .app-footer,
    .bottom-nav {
        display: flex !important;
        visibility: visible !important;
    }
}

@media (min-width: 992px) {
    .app-footer,
    .bottom-nav {
        display: flex !important;
        visibility: visible !important;
    }
}

@media (min-width: 1200px) {
    .app-footer,
    .bottom-nav {
        display: flex !important;
        visibility: visible !important;
    }
}

@media (min-width: 1400px) {
    .app-footer,
    .bottom-nav {
        display: flex !important;
        visibility: visible !important;
    }
}

/* Ensure body doesn't hide the footer */
body {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Logout Button Special Styling */
.bottom-nav .nav-item-logout {
    flex: 0 0 auto;
    margin-left: 4px;
}

.bottom-nav .nav-item-logout .nav-item-form {
    flex: 0 0 auto;
    width: auto;
}

.bottom-nav .nav-item-logout-btn {
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 60px;
    position: relative;
}

.bottom-nav .nav-item-logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.bottom-nav .nav-item-logout-btn:hover .nav-icon {
    background: rgba(239, 68, 68, 0.12);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.bottom-nav .nav-item-logout-btn:hover .nav-icon i {
    color: #ef4444;
    transform: scale(1.15);
}

.bottom-nav .nav-item-logout-btn:active {
    transform: scale(0.95);
    background: rgba(239, 68, 68, 0.15);
}

.bottom-nav .nav-item-logout-btn .nav-label {
    font-weight: 500;
}

.bottom-nav .nav-item-logout-btn:hover .nav-label {
    color: #ef4444;
    font-weight: 600;
}

/* Form Controls - App Style */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding: 14px 16px;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    min-height: 48px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    outline: none !important;
    border-width: 2px !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
}

.form-control:hover, .form-select:hover {
    border-color: #cbd5e1 !important;
    border-width: 2px !important;
}

.form-control::placeholder, .form-select::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
    font-weight: 400;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #1a1a1a !important;
    border: 2px solid #6366f1 !important;
}

/* Enhanced contrast for create session form */
.create-shopping-session-form .form-control,
.create-shopping-session-form .form-select {
    border: 2px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
}

.create-shopping-session-form .form-control:focus,
.create-shopping-session-form .form-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.create-shopping-session-form .form-label {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 14px;
}

.input-group-text {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-right: none;
    color: var(--text-secondary);
    padding: 14px 16px;
}

/* Tables - App Style */
.table {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 0;
}

.table thead {
    background: var(--bg-secondary);
}

.table thead th {
    border: none;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 0.5px solid var(--border-color);
    transition: background 0.15s ease;
}

.table tbody tr:active {
    background: var(--bg-secondary);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 15px;
}

/* Badges - App Style */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.badge i {
    font-size: 10px;
}

.badge.bg-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.badge.bg-info {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge.bg-secondary {
    background: #6b7280;
    color: white;
    font-weight: 600;
    border: none;
}

.badge.bg-dark {
    background: #1f2937;
    color: white;
    font-weight: 600;
    border: none;
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Progress Bars - App Style */
.progress {
    border-radius: var(--radius-full);
    height: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Alerts - App Style */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.alert i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

/* Empty States - App Style */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-tertiary);
    opacity: 0.5;
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

/* Modals - App Style (Bottom Sheet) */
.modal {
    --bs-modal-border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-content {
    border: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 0.5px solid var(--border-color);
    padding: 20px 20px 16px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 0.5px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
}

.modal-footer .btn {
    flex: 1;
}

/* Toast Notifications - Mobile Style */
.toast-container {
    pointer-events: none;
    padding: 12px !important;
    margin-top: 60px !important;
}

.toast {
    pointer-events: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    font-size: 15px;
    padding: 0;
    min-width: auto;
    width: 100%;
}

.toast-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast .btn-close {
    padding: 14px 16px;
    margin: 0;
}

@media (max-width: 576px) {
    .toast-container {
        padding: 12px !important;
        margin-top: 60px !important;
    }
    
    .toast {
        font-size: 14px;
    }
    
    .toast-body {
        padding: 12px 14px;
    }
}

/* Mobile Optimizations */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 80px;
        font-size: 15px;
    }
    
    
    .card {
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }
    
    .card-body {
        padding: 16px;
    }
    
    .card-header {
        padding: 14px 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: var(--radius-md) !important;
        margin-bottom: 8px;
    }
    
    .table-responsive {
        border-radius: var(--radius-md);
        margin-bottom: 12px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 28px;
        font-weight: 700;
    }
    
    h2 {
        font-size: 22px;
        font-weight: 600;
    }
    
    h3 {
        font-size: 20px;
        font-weight: 600;
    }
    
    .row > [class*="col-"] {
        margin-bottom: 12px;
    }
    
    .navbar.d-none.d-lg-block {
        display: none !important;
    }
    
    .fab {
        bottom: 90px;
    }
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
    
    
    .app-content {
        padding: 0;
    }
    
    .fab {
        display: none;
    }
    
    /* Bottom nav is now visible on all devices including desktop */
    .app-footer,
    .bottom-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert, .stats-card, .list-item {
    animation: slideUp 0.3s ease;
}

/* Loading Spinner */
.spinner-border {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Page Container - Organized Structure (Deprecated - use container) */
.page-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.page-content {
    padding: 0;
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Section Headers - Modern */
.section-header-modern {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header-modern h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.section-header-modern small {
    font-size: 13px;
    color: var(--text-secondary);
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .section-header-modern {
        padding: 24px 0;
    }
    
    .section-header-modern h2 {
        font-size: 28px;
    }
    
    .section-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

/* Breadcrumb - Modern Professional Style - Perfectly Symmetric */
.breadcrumb-modern {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 16px 24px;
    margin-bottom: 28px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breadcrumb-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, 
        #6366f1 0%, 
        #8b5cf6 50%, 
        #a855f7 100%);
    border-radius: 20px 0 0 20px;
    box-shadow: 2px 0 8px rgba(99, 102, 241, 0.3);
}

.breadcrumb-modern::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.03) 100%);
    pointer-events: none;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    height: 36px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    height: 36px;
    line-height: 36px;
    flex-shrink: 0;
}

.breadcrumb-separator-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 4px;
    flex-shrink: 0;
    position: relative;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    padding: 0 14px;
    height: 36px;
    min-height: 36px;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.breadcrumb-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.breadcrumb-link:hover {
    color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.breadcrumb-link:hover::before {
    opacity: 1;
}

.breadcrumb-link i {
    font-size: 13px;
    color: #6366f1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    flex-shrink: 0;
    line-height: 1;
}

.breadcrumb-link:hover i {
    transform: scale(1.1) rotate(5deg);
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.breadcrumb-text {
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-link:hover .breadcrumb-text {
    font-weight: 600;
}

.breadcrumb-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #1e293b;
    font-weight: 600;
    padding: 0 16px;
    height: 36px;
    min-height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.12) 0%, 
        rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 
        0 2px 8px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.breadcrumb-current::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.breadcrumb-current i {
    font-size: 13px;
    color: #6366f1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    line-height: 1;
}

.breadcrumb-current .breadcrumb-text {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-separator {
    font-size: 11px;
    color: #cbd5e1;
    opacity: 0.6;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    line-height: 1;
    margin: 0;
}

.breadcrumb-separator-wrapper:hover .breadcrumb-separator {
    color: #94a3b8;
    opacity: 0.8;
}

.breadcrumb-item.active .breadcrumb-current {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-color: #6366f1;
    box-shadow: 
        0 4px 16px rgba(99, 102, 241, 0.35),
        0 2px 8px rgba(99, 102, 241, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
    height: 36px;
    min-height: 36px;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 4px 16px rgba(99, 102, 241, 0.35),
            0 2px 8px rgba(99, 102, 241, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(99, 102, 241, 0.45),
            0 2px 12px rgba(99, 102, 241, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.breadcrumb-item.active .breadcrumb-current i {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    width: 20px;
    height: 20px;
}

.breadcrumb-item.active .breadcrumb-current::before {
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .breadcrumb-modern {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .breadcrumb-link {
    color: #94a3b8;
}

[data-bs-theme="dark"] .breadcrumb-link:hover {
    color: #818cf8;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

[data-bs-theme="dark"] .breadcrumb-link i {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.15);
}

[data-bs-theme="dark"] .breadcrumb-link:hover i {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.25);
}

[data-bs-theme="dark"] .breadcrumb-current {
    color: #f1f5f9;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 
        0 2px 8px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .breadcrumb-current i {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.2);
}

[data-bs-theme="dark"] .breadcrumb-separator {
    color: #475569;
    opacity: 0.7;
}

[data-bs-theme="dark"] .breadcrumb-separator-wrapper:hover .breadcrumb-separator {
    color: #64748b;
    opacity: 0.9;
}

[data-bs-theme="dark"] .breadcrumb-item.active .breadcrumb-current {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    box-shadow: 
        0 4px 16px rgba(99, 102, 241, 0.4),
        0 2px 8px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .breadcrumb-modern {
        padding: 14px 18px;
        margin-bottom: 20px;
        border-radius: 16px;
    }
    
    .breadcrumb-modern::before {
        width: 4px;
        border-radius: 16px 0 0 16px;
    }
    
    .breadcrumb-list {
        gap: 0;
        height: 32px;
    }
    
    .breadcrumb-item {
        font-size: 13px;
        height: 32px;
        line-height: 32px;
    }
    
    .breadcrumb-link,
    .breadcrumb-current {
        padding: 0 10px;
        height: 32px;
        min-height: 32px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .breadcrumb-link .breadcrumb-text,
    .breadcrumb-current .breadcrumb-text {
        display: none;
    }
    
    .breadcrumb-link i,
    .breadcrumb-current i {
        font-size: 14px;
        width: 20px;
        height: 20px;
    }
    
    .breadcrumb-item.active .breadcrumb-current {
        height: 32px;
        min-height: 32px;
    }
    
    .breadcrumb-separator-wrapper {
        height: 32px;
        padding: 0 3px;
    }
    
    .breadcrumb-separator {
        font-size: 10px;
        width: 14px;
        height: 14px;
    }
}

/* Legacy breadcrumb support */
.breadcrumb {
    background: transparent;
    padding: 12px 16px;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* Input Groups */
.input-group {
    margin-bottom: 16px;
}

.input-group .form-control {
    border-radius: var(--radius-md);
}

.input-group-text {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* Select Dropdowns */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
}

[data-bs-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* List Components Styles */
.sessions-list-container,
.families-list-container {
    animation: fadeIn 0.3s ease-in;
    padding: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Header in Lists - Override */
.sessions-list-container .page-header,
.families-list-container .page-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .sessions-list-container .page-header,
    .families-list-container .page-header {
        padding: 32px;
        margin-bottom: 32px;
    }
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

.card-modern {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 24px;
    border: 0.5px solid var(--border-color);
}

.card-modern-body {
    padding: 20px;
}

@media (min-width: 768px) {
    .card-modern {
        margin-bottom: 32px;
    }
    
    .card-modern-body {
        padding: 24px;
    }
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 10;
}

.search-input {
    padding-left: 2.5rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card-primary .stat-icon {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.stat-card-success .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card-info .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.stat-label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Families Page Styles */
.families-page {
    min-height: 100vh;
    padding: 0;
}

.page-header-modern {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 0.5px solid var(--border-color);
}

.page-header-modern h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-modern h1 i {
    font-size: 24px;
    color: var(--primary-color);
}

.page-header-modern .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-create-family {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}

.btn-create-family:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
    background: var(--primary-dark);
}

@media (min-width: 768px) {
    .page-header-modern {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .page-header-modern h1 {
        font-size: 28px;
    }
    
    .page-header-modern h1 i {
        font-size: 28px;
    }
}

.empty-state-card {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 60px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.empty-state-content {
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-tertiary);
    position: relative;
}

.empty-state-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    z-index: -1;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.empty-state-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-actions .btn {
    min-width: 180px;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.empty-state-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .empty-state-card {
        padding: 40px 20px;
    }
    
    .empty-state-icon {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .empty-state-title {
        font-size: 20px;
    }
    
    .empty-state-text {
        font-size: 14px;
    }
    
    .empty-state-actions {
        flex-direction: column;
    }
    
    .empty-state-actions .btn {
        width: 100%;
        min-width: auto;
    }
}
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Sessions Grid */
.sessions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .sessions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1200px) {
    .sessions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.session-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.session-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.session-card-active {
    border-left: 4px solid #10b981;
}

.session-card-completed {
    border-left: 4px solid #6366f1;
}

.session-card-pending {
    border-left: 4px solid #6b7280;
}

.session-card-cancelled {
    border-left: 4px solid #ef4444;
}

/* Session Card Header - Override with gradient background from inline style */
.session-card-header {
    padding: 24px;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.session-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

/* Session Card Elements - Modern */
.session-status-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.session-icon-large {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.session-card:hover .session-icon-large {
    transform: scale(1.15) rotate(10deg);
}

.session-card-body {
    padding: 24px;
    flex: 1;
}

.session-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.session-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.session-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.session-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.session-meta-item i {
    width: 20px;
    color: var(--primary-color);
}

.session-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.session-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.session-card:hover .session-stat {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.stat-icon-small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-text {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.session-date {
    font-size: 13px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.session-card-footer {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.view-session-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.session-card:hover .view-session-btn {
    color: var(--primary-dark);
    transform: translateX(4px);
}

.session-card:hover .view-session-btn i {
    transform: translateX(4px);
}

/* Families List Wrapper */
.families-list-wrapper {
    animation: fadeIn 0.4s ease-in;
}

/* Search Card - Enhanced */
.search-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-card:focus-within {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--shadow-lg);
    border-color: var(--primary-color);
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 18px;
    z-index: 10;
    transition: color 0.2s ease;
}

.search-card:focus-within .search-icon {
    color: var(--primary-color);
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.search-clear {
    position: absolute;
    right: 12px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-clear:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.search-clear:active {
    transform: scale(1.05) rotate(90deg);
}

/* Families List Grid */
.families-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .families-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1200px) {
    .families-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.family-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.family-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.family-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.family-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.family-badges {
    display: flex;
    gap: 0.5rem;
}

.family-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.family-badge-warning {
    background: rgba(245, 158, 11, 0.9);
    backdrop-filter: blur(10px);
}

.family-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.family-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.family-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.family-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.family-card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.family-code {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.family-code code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.family-arrow {
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.family-card:hover .family-arrow {
    transform: translateX(5px);
    color: var(--primary-color);
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .sessions-list-container .page-header,
    .families-list-container .page-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .header-actions {
        width: 100%;
        margin-top: 1rem;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .card-modern {
        margin-bottom: 20px;
    }
    
    .card-modern-body {
        padding: 16px;
    }
}

/* Focus States */
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Safe Area Support */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Item Cards - Shopping Session Items */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
    overflow: hidden;
}

.item-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.item-card-approved {
    border-left: 4px solid var(--success-color);
}

.item-card-pending {
    border-left: 4px solid var(--warning-color);
}

.item-card-rejected {
    border-left: 4px solid var(--danger-color);
}

.item-card-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.item-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-header-content {
    flex-grow: 1;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.item-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.item-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.item-status-approved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.item-status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.item-status-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.item-category-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-price {
    text-align: right;
    flex-shrink: 0;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.price-currency {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.item-description {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.item-actions {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.empty-items-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-items-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.empty-items-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-items-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Challenge Cards */
.challenge-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.challenge-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.challenge-active {
    border-left: 4px solid var(--success-color);
}

.challenge-completed {
    border-left: 4px solid var(--info-color);
}

.challenge-failed {
    border-left: 4px solid var(--danger-color);
}

.challenge-cancelled {
    border-left: 4px solid var(--text-tertiary);
}

.challenge-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
}

.challenge-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.challenge-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.challenge-badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.challenge-badge-completed {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info-color);
}

.challenge-badge-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.challenge-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.challenge-progress {
    margin-top: 1rem;
}

.challenge-progress-bar {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.challenge-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Map Styles */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.map-marker-popup {
    padding: 0.5rem;
}

.map-marker-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.map-marker-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Analytics Styles */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.analytics-chart {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

.category-breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.category-breakdown-item:last-child {
    border-bottom: none;
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.category-amount {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Settlement Styles */
.settlement-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.settlement-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.settlement-member:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settlement-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.settlement-amount.positive {
    color: var(--success-color);
}

.settlement-amount.negative {
    color: var(--danger-color);
}

.settlement-transaction {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.transaction-arrow {
    color: var(--text-tertiary);
    margin: 0 1rem;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.25rem;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--bg-secondary);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.autocomplete-item-category {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Budget Styles */
.budget-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.budget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.budget-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.budget-progress {
    margin-top: 1rem;
}

.budget-progress-bar {
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.budget-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.budget-progress-fill.warning {
    background: linear-gradient(90deg, var(--warning-color), #f59e0b);
}

.budget-progress-fill.danger {
    background: linear-gradient(90deg, var(--danger-color), #dc2626);
}

/* Export Button Styles */
.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Insights Styles */
.insights-container {
    margin-top: 2rem;
}

.insight-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.insight-card.success {
    border-left-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.insight-card.warning {
    border-left-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.insight-card.danger {
    border-left-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.insight-card.info {
    border-left-color: var(--info-color);
    background: rgba(59, 130, 246, 0.05);
}

.insight-message {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Top Spenders Styles */
.top-spenders-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-spender-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.top-spender-item:last-child {
    border-bottom: none;
}

.top-spender-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-spender-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.top-spender-name {
    font-weight: 600;
    color: var(--text-primary);
}

.top-spender-amount {
    font-weight: 700;
    color: var(--primary-color);
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .item-card-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

[data-bs-theme="dark"] .challenge-card-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

[data-bs-theme="dark"] .session-card-header {
    background: var(--bg-secondary);
}

[data-bs-theme="dark"] .family-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Print Styles */
@media print {
    .bottom-nav,
    .fab,
    .btn,
    .navbar {
        display: none !important;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .card {
        page-break-inside: avoid;
    }
}

/* Modern Family Cards - Beautiful Design */
.family-card-modern {
    background: var(--bg-primary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.family-card-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.family-card-modern:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25), 0 16px 48px rgba(0, 0, 0, 0.18);
    border-color: rgba(99, 102, 241, 0.5);
}

.family-card-modern:hover::after {
    opacity: 1;
}

.family-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.family-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.family-card-header-modern {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.family-card-header-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: shimmer 4s infinite ease-in-out;
    opacity: 0.6;
}

.family-card-header-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

@keyframes shimmer {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }
    50% { 
        transform: translate(-30%, -30%) rotate(180deg);
        opacity: 0.8;
    }
}

.family-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.family-icon-modern {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.family-card-modern:hover .family-icon-modern {
    transform: scale(1.2) rotate(12deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.family-header-info {
    flex: 1;
    min-width: 0;
}

.family-name-modern {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.75rem 0;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.family-role-badge {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.role-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.role-badge.creator {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 193, 7, 0.35));
    color: #ffd700;
    border: 1.5px solid rgba(255, 215, 0, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.role-badge.admin {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.35));
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.role-badge.member {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.family-card-body-modern {
    padding: 20px 24px;
    flex-grow: 1;
    background: var(--bg-primary);
}

.family-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.family-card-modern:hover .family-name {
    color: var(--primary-color);
}

.family-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.badge-members {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.badge-currency {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-threshold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.family-card-modern:hover .info-badge {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.family-card-modern:hover .badge-members {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.family-card-modern:hover .badge-currency {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.family-card-modern:hover .badge-threshold {
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.family-stats-row {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.stat-item i {
    color: var(--primary-color);
    font-size: 16px;
    transition: transform 0.2s ease;
}

.family-card-modern:hover .stat-item {
    color: var(--text-primary);
}

.family-card-modern:hover .stat-item i {
    transform: scale(1.3) rotate(10deg);
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.role-creator {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.role-admin {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

.role-member {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.family-card-modern:hover .role-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.family-stats-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.family-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.stat-icon-small {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.family-stat-item:hover .stat-icon-small {
    transform: scale(1.1) rotate(5deg);
}

.stat-content-small {
    flex: 1;
    min-width: 0;
}

.stat-value-small {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.stat-label-small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.family-info-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.info-item i {
    font-size: 1rem;
}

.info-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.family-code-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.family-card-modern:hover .family-code-modern {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.family-code-modern i {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.family-code-modern code {
    flex: 1;
    background: var(--bg-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    border: 1px solid var(--border-color);
    font-family: 'Courier New', monospace;
}

.btn-copy-code {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.btn-copy-code:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-copy-code:active {
    transform: scale(1.05) rotate(0deg);
}

.btn-copy-code.copied {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border-color: var(--success-color);
    color: var(--success-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    animation: copyPulse 0.5s ease;
}

@keyframes copyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.family-card-footer-modern {
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.family-code-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.family-code-modern i {
    color: var(--text-tertiary);
    font-size: 14px;
}

.family-code-modern code {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.family-card-modern:hover .family-code-modern code {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.family-card-footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.family-card-modern:hover .family-card-footer-modern {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-top-color: rgba(99, 102, 241, 0.3);
}

.family-card-modern:hover .family-card-footer-modern::before {
    left: 100%;
}

.footer-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.footer-arrow {
    color: var(--text-tertiary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.family-card-modern:hover .footer-arrow {
    transform: translateX(8px) scale(1.2);
    color: var(--primary-color);
}

/* Responsive adjustments for family cards */
@media (max-width: 767px) {
    .family-card-header-modern {
        padding: 1.25rem;
    }
    
    .family-icon-modern {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .family-name-modern {
        font-size: 1.25rem;
    }
    
    .family-card-body-modern {
        padding: 1.25rem;
    }
    
    .family-stats-modern {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .stat-icon-small {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .stat-value-small {
        font-size: 1.1rem;
    }
    
    .stat-label-small {
        font-size: 0.7rem;
    }
}

/* Dark mode adjustments for family cards */
[data-bs-theme="dark"] .family-card-modern {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .family-card-modern:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .family-code-modern code {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

/* Shopping Session Items Styles */
.items-container {
    background: var(--bg-primary);
}

.items-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.items-body {
    min-height: 200px;
}

.empty-items-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-items-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.empty-items-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-items-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    transition: all 0.2s;
    overflow: hidden;
}

.item-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.item-card-approved {
    border-left: 4px solid #10b981;
}

.item-card-pending {
    border-left: 4px solid #f59e0b;
}

.item-card-rejected {
    border-left: 4px solid #ef4444;
}

.item-card-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.item-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.item-header-content {
    flex-grow: 1;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.item-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.item-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.item-status-approved {
    background: #d1fae5;
    color: #065f46;
}

.item-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.item-status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.item-category-badge {
    padding: 0.25rem 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-price {
    text-align: right;
    flex-shrink: 0;
}

.price-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-currency {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.item-description {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-card-footer {
    padding: 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.items-total-footer {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    color: white;
}

.total-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.1rem;
    font-weight: 600;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .item-card-header {
        flex-wrap: wrap;
    }
    
    .item-price {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .item-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .item-actions {
        width: 100%;
    }
}

/* Dynamic Create Budget Button - Beautiful & Interactive */
.btn-create-budget {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-create-budget::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.btn-create-budget:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5), 0 4px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
}

.btn-create-budget:hover::before {
    left: 100%;
}

.btn-create-budget:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-create-budget-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-create-budget:hover .btn-create-budget-icon {
    transform: rotate(90deg) scale(1.15);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-create-budget-icon i {
    font-size: 1rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-create-budget:hover .btn-create-budget-icon i {
    transform: rotate(180deg);
}

.btn-create-budget-text {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.btn-create-budget:hover .btn-create-budget-text {
    letter-spacing: 1px;
}

.btn-create-budget-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.btn-create-budget-ripple.ripple-active {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .btn-create-budget {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        gap: 0.625rem;
    }
    
    .btn-create-budget-icon {
        width: 28px;
        height: 28px;
    }
    
    .btn-create-budget-icon i {
        font-size: 0.875rem;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .btn-create-budget {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .btn-create-budget:hover {
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Family Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-item-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-item-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.info-item-card:hover .info-icon {
    transform: scale(1.1) rotate(5deg);
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.invite-code {
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    flex: 1;
}

.btn-copy-invite {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-invite:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Gamification Items */
.gamification-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gamification-item:last-child {
    border-bottom: none;
}

.gamification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.gamification-item:hover {
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
    padding-left: 28px;
}

.gamification-item:hover::before {
    transform: scaleY(1);
}

.gamification-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gamification-item:hover .gamification-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gamification-content {
    flex: 1;
    min-width: 0;
}

.gamification-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.gamification-badge {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.badge-count.badge-warning {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.badge-count.badge-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.gamification-item:hover .badge-count {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gamification-arrow {
    color: var(--text-tertiary);
    font-size: 18px;
    transition: all 0.3s ease;
}

.gamification-item:hover .gamification-arrow {
    transform: translateX(8px);
    color: var(--primary-color);
}

/* Session Items */
.session-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.session-item:last-child {
    border-bottom: none;
}

.session-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.session-item:hover {
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
    padding-left: 28px;
}

.session-item:hover::before {
    transform: scaleY(1);
}

.session-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.session-item:hover .session-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.session-content {
    flex: 1;
    min-width: 0;
}

.session-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.session-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-badge.status-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-badge.status-completed {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.status-badge.status-cancelled {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.amount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.session-item:hover .status-badge,
.session-item:hover .amount-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.session-arrow {
    color: var(--text-tertiary);
    font-size: 18px;
    transition: all 0.3s ease;
}

.session-item:hover .session-arrow {
    transform: translateX(8px);
    color: var(--primary-color);
}

/* Member Items */
.member-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.member-item:last-child {
    border-bottom: none;
}

.member-item:hover {
    background: var(--bg-secondary);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.member-item:hover .member-avatar {
    transform: scale(1.1) rotate(5deg);
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.member-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.member-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.member-email {
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.member-role-badge.role-admin {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.member-role-badge.role-member {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.member-item:hover .member-role-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.member-joined {
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-badge.role-creator {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

@media (max-width: 768px) {
    .member-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .member-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .member-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .gamification-item,
    .session-item {
        padding: 16px;
    }
    
    .gamification-icon,
    .session-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* ============================================
   SHOPPING SESSIONS LIST - MODERN DESIGN
   ============================================ */

/* Sessions Header */
.sessions-header {
    padding: 0;
}

.sessions-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.sessions-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Quick Stats Grid */
.sessions-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-card-mini {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stat-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.stat-card-mini:hover::before {
    transform: scaleX(1);
}

.stat-card-mini.stat-primary {
    border-color: #6366f1;
}

.stat-card-mini.stat-primary:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.stat-card-mini.stat-primary::before {
    background: #6366f1;
}

.stat-card-mini.stat-success {
    border-color: #10b981;
}

.stat-card-mini.stat-success:hover {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.stat-card-mini.stat-success::before {
    background: #10b981;
}

.stat-card-mini.stat-info {
    border-color: #3b82f6;
}

.stat-card-mini.stat-info:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.stat-card-mini.stat-info::before {
    background: #3b82f6;
}

.stat-card-mini.stat-warning {
    border-color: #f59e0b;
}

.stat-card-mini.stat-warning:hover {
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
}

.stat-card-mini.stat-warning::before {
    background: #f59e0b;
}

.stat-icon-mini {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card-mini.stat-primary .stat-icon-mini {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.stat-card-mini.stat-success .stat-icon-mini {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card-mini.stat-info .stat-icon-mini {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-card-mini.stat-warning .stat-icon-mini {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-content-mini {
    flex: 1;
    min-width: 0;
}

.stat-value-mini {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label-mini {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search and Filters Card */
.search-filters-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-section {
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-tertiary);
    font-size: 18px;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 56px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-clear {
    position: absolute;
    right: 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.search-clear:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
}

.filters-section {
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.filter-btn.filter-active.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
}

.filter-btn.filter-completed.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: #6366f1;
}

.filter-btn.filter-pending.active {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border-color: #6b7280;
}

.filter-btn.filter-cancelled.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
}

/* Empty State */
.empty-sessions-state {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
}

.empty-icon-wrapper {
    margin-bottom: 24px;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-tertiary);
    position: relative;
}

.empty-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    z-index: -1;
}

.empty-sessions-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-sessions-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Pagination Wrapper */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination-wrapper .pagination {
    gap: 8px;
}

.pagination-wrapper .page-link {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 10px 16px;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-wrapper .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-wrapper .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Responsive Design for Sessions */
@media (max-width: 768px) {
    .sessions-header h1 {
        font-size: 24px;
    }
    
    .sessions-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card-mini {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .stat-icon-mini {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .stat-value-mini {
        font-size: 20px;
    }
    
    .search-filters-card {
        padding: 16px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .session-card-header {
        padding: 20px;
        min-height: 100px;
    }
    
    .session-icon-large {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    
    .session-card-body {
        padding: 20px;
    }
    
    .session-name {
        font-size: 18px;
    }
    
    .session-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .empty-sessions-state {
        padding: 60px 20px;
    }
    
    .empty-icon {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
}

@media (min-width: 1200px) {
    .sessions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Prevent horizontal scrolling globally */
* {
    max-width: 100%;
}

/* Global text contrast rules - prevent invisible text */
.card,
.card-body,
.card-header,
.card-modern,
.card-modern-enhanced,
.card-modern-body,
.card-modern-header {
    color: #1f2937 !important;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card p,
.card span,
.card-modern h1,
.card-modern h2,
.card-modern h3,
.card-modern h4,
.card-modern h5,
.card-modern h6,
.card-modern p,
.card-modern span,
.card-modern-enhanced h1,
.card-modern-enhanced h2,
.card-modern-enhanced h3,
.card-modern-enhanced h4,
.card-modern-enhanced h5,
.card-modern-enhanced h6,
.card-modern-enhanced p,
.card-modern-enhanced span {
    color: #1f2937 !important;
}

/* Ensure member names and details are visible */
.member-name-enhanced,
.member-detail-item,
.member-detail-item span {
    color: #1f2937 !important;
}

.member-detail-item {
    color: #374151 !important;
}

/* Ensure list items are visible */
.list-item-title-enhanced,
.list-item-subtitle-enhanced {
    color: #1f2937 !important;
}

/* Ensure info labels and values are visible */
.info-label-enhanced {
    color: #4b5563 !important;
}

.info-value-enhanced,
.info-value-enhanced code,
.info-value-enhanced span {
    color: #1f2937 !important;
}

/* Override white text only on gradient backgrounds */
.families-page .page-header-modern,
.families-page .page-header-modern *,
.family-header-card,
.family-header-card * {
    color: white !important;
}

/* But keep dark text on white cards */
.families-page .card,
.families-page .card *,
.families-page .card-modern,
.families-page .card-modern *,
.families-page .card-modern-enhanced,
.families-page .card-modern-enhanced * {
    color: #1f2937 !important;
}

html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

.app-main, .container, .row, [class*="col-"] {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Disable horizontal scrolling for all table-responsive by default */
.table-responsive {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Allow horizontal scrolling ONLY for comparison tables */
.comparison-table-wrapper .table-responsive,
#comparison .table-responsive,
.comparison-table-wrapper,
#comparison {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.comparison-table-wrapper .table-responsive,
#comparison .table-responsive {
    max-width: 100%;
}
