/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enhanced contrast color variables */
:root {
    --primary-green: #059669;
    --primary-green-dark: #047857;
    --primary-green-light: #10b981;
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-muted: #4a5568;
    --text-light: #718096;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    --background-light: #f7fafc;
    --background-white: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --material-icon-color: #136a6a;
}

/* App Navigation */
.app-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-green-dark);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-title {
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(5, 150, 105, 0.15);
    color: var(--primary-green-dark);
}

.nav-link.active {
    background: var(--primary-green-dark);
    color: white;
    font-weight: 700;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link span {
    font-size: 0.95rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* App Container */
.app-container {
    min-height: calc(100vh - 70px);
    background: #f8fafc;
}

/* Page Header */
.page-header {
    background: white;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        height: 60px;
    }
    
    .nav-brand {
        font-size: 1.3rem;
    }
    
    .nav-logo {
        height: 32px;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        gap: 4px;
    }
    
    .nav-menu.nav-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* Notification Badge */
.notification-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
    line-height: 14px;
}

/* Notifications Page */
.notification-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.notifications-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.notification-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
}

.notification-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.notification-item.unread {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-item.unread .notification-icon {
    background: #10b981;
    color: white;
}

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

.notification-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.notification-content p {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    line-height: 1.5;
}

.notification-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

.notification-time {
    font-weight: 500;
}

.notification-amount {
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    color: #d1d5db;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Friend Selection */
.friend-selection {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: #f9fafb;
    max-height: 200px;
    overflow-y: auto;
}

.friend-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.friend-option:hover {
    background: #f3f4f6;
}

.friend-option input[type="checkbox"] {
    margin: 0;
}

.friend-name {
    font-weight: 500;
    color: #374151;
}

/* Settings Overlay */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.settings-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow-x: auto;
}

.settings-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.settings-tab:hover {
    color: #374151;
    background: #f3f4f6;
}

.settings-tab.active {
    color: #10b981;
    border-bottom-color: #10b981;
    background: white;
}

.settings-tab i {
    font-size: 1.1rem;
}

/* Settings Tab Content */
.settings-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-tab-content.active {
    display: block;
}

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

.tab-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.form-hint {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.settings-content {
    padding: 1.5rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.setting-option:hover {
    background: #f9fafb;
}

.setting-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.setting-option input[type="checkbox"]:checked + .checkmark {
    background: #10b981;
    border-color: #10b981;
}

.setting-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    flex: 1;
}

.option-text strong {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.option-text small {
    color: #6b7280;
    font-size: 0.875rem;
}

.settings-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

/* CTA Button Styles - matching index.html */
.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid transparent;
    cursor: pointer;
    min-width: 140px;
}

.cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cta-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid #10b981;
}

.cta-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
}

.cta-secondary {
    background: transparent;
    color: #6b7280;
    border: 2px solid #d1d5db;
}

.cta-secondary:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #9ca3af;
}

.cta i {
    font-size: 1rem;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    min-width: 300px;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast.notification-success {
    border-left: 4px solid #10b981;
}

.notification-toast.notification-error {
    border-left: 4px solid var(--primary-green-dark);
}

.notification-toast.notification-info {
    border-left: 4px solid var(--primary-green);
}

.notification-toast i {
    font-size: 1.25rem;
}

.notification-success i {
    color: #10b981;
}

.notification-error i {
    color: var(--primary-green-dark);
}

.notification-info i {
    color: var(--primary-green);
}

/* Mobile responsiveness for notifications */
@media (max-width: 768px) {
    .notification-item {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .notification-actions {
        align-self: flex-end;
    }
    
    .notification-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .settings-modal {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .settings-header {
        padding: 1rem;
    }
    
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .settings-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-width: auto;
    }
    
    .settings-tab i {
        font-size: 1rem;
    }

    .settings-content {
        padding: 1rem;
    }

    .settings-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .notification-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 16px;
        border-radius: 8px;
    }
    
    .nav-link span {
        font-size: 1rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .page-header {
        padding: 30px 16px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .nav-brand {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .nav-logo {
        height: 28px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

body {
    font-family: 'Poppins', 'Inter', 'Nunito', system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
.main-content {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero {
        grid-column: 1 / -1;
    }
}

/* Hero section */
.hero {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--background-white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow-medium);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Forms */
.bill-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px;
    border: 2px solid var(--border-medium);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--background-white);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-green-dark);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Cost breakdown */
.cost-breakdown {
    margin-top: 10px;
}

.cost-breakdown h4 {
    margin-bottom: 15px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cost-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.cost-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cost-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.cost-item input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, #034e3a 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.5);
    background: linear-gradient(135deg, #034e3a 0%, #022c22 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Bills list */
.bills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* PWA Install Prompt Button */
.install-prompt-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    animation: pulse-install 2s infinite;
}

.install-prompt-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.install-prompt-btn:active {
    transform: translateY(0);
}

.install-prompt-btn i {
    font-size: 1rem;
}

@keyframes pulse-install {
    0% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    }
    100% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }
}

.bills-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bills-list {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Friends page styles */
.add-friend-section {
    margin-bottom: 30px;
}

.add-friend-form {
    margin-top: 20px;
}

.search-container {
    display: flex;
    gap: 15px;
    align-items: end;
}

.search-container input {
    flex: 1;
}

.search-results {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.search-results h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Already friend styling */
.search-result-item.already-friend {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid var(--primary-green);
    opacity: 0.8;
}

.search-result-item.already-friend:hover {
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    transform: translateY(-1px);
}

.search-result-item.already-friend .user-avatar {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
}

.search-result-item.already-friend .user-info h4 {
    color: var(--primary-green-dark);
}

.search-result-item.already-friend .user-info p {
    color: var(--primary-green);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-avatar.large {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.user-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.user-details {
    margin: 5px 0 0 0 !important;
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    line-height: 1.4;
}

.friend-details {
    margin: 5px 0 0 0 !important;
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    line-height: 1.4;
}

.user-email {
    color: #868e96 !important;
    font-size: 0.8rem !important;
}

.friends-list-section {
    margin-bottom: 30px;
}

.friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.friends-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friends-list {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.friend-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.friend-info {
    flex: 1;
}

.friend-info h4 {
    margin: 0 0 5px 0;
    color: #212529;
    font-size: 1.1rem;
}

.friend-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.friend-email {
    color: #868e96 !important;
    font-size: 0.8rem !important;
}

.friend-actions {
    display: flex;
    gap: 15px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #212529;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 24px;
}

.friend-preview-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.user-details h4 {
    margin: 0 0 5px 0;
    color: #212529;
    font-size: 1.2rem;
}

.user-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Message styles */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

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

.message-error {
    background: linear-gradient(135deg, var(--primary-green-light) 0%, var(--primary-green-dark) 100%);
}

.message-info {
    background: linear-gradient(135deg, var(--primary-green-light) 0%, var(--primary-green) 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.no-bills {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
}

.bill-item {
    padding: 20px;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    background: #f0fdf4;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bill-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    background: #ecfdf5;
}

/* Bill Card Sections */
.bill-section {
    margin-bottom: 16px;
}

.bill-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* When & Where Section */
.bill-header-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.bill-header-section .bill-purpose {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.bill-header-section .bill-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Amount Section */
.bill-amount-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.bill-amount-section .bill-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
}

/* Bill Paid Section */
.bill-paid-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
}

.bill-paid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.paid-by-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #475569;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    min-height: 32px;
}

.paid-by-tag:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.paid-by-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.paid-by-name {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.paid-by-remove {
    background: #374151;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.paid-by-remove:hover {
    background: #1f2937;
    transform: scale(1.1);
}

/* Paid-by dropdown select */
.paid-by-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

.paid-by-select:hover {
    border-color: #cbd5e1;
    background-color: #f9fafb;
}

.paid-by-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.paid-by-select option {
    padding: 10px;
    font-size: 15px;
}

/* Attendees Section */
.bill-attendees-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

/* Status Section */
.bill-status-section {
    background: #fefefe;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
}

/* CTA Buttons Section */
.bill-actions-section {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

.bill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bill-purpose {
    font-weight: 600;
    color: #333;
}

.bill-amount {
    font-weight: 700;
    color: #10b981;
    font-size: 1.1rem;
}

.bill-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}


.bill-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-small {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-small:hover {
    opacity: 0.8;
}

.btn-secondary {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-split {
    background: var(--primary-green);
    color: white;
}

.btn-qr {
    background: var(--primary-green-dark);
    color: white;
}

/* Circular Material Symbols Buttons */
.btn-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.btn-circle .material-symbols-outlined {
    color: white !important;
}

.btn-circle:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.5);
    border-color: #f0fdf4;
}

.btn-circle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.btn-circle.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    box-shadow: none;
}

.btn-circle.btn-outline .material-symbols-outlined {
    color: var(--primary-green) !important;
}

.btn-circle.btn-outline:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.btn-circle.btn-outline:hover .material-symbols-outlined {
    color: white !important;
}

.btn-circle.btn-danger {
    background: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-circle.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.btn-circle.btn-danger.btn-outline {
    background: transparent;
    border: 2px solid #dc2626;
    color: #dc2626;
    box-shadow: none;
}

.btn-circle.btn-danger.btn-outline .material-symbols-outlined {
    color: #dc2626 !important;
}

.btn-circle.btn-danger.btn-outline:hover {
    background: #dc2626;
    color: white;
}

.btn-circle.btn-danger.btn-outline:hover .material-symbols-outlined {
    color: white !important;
}

.btn-circle.btn-sm {
    width: 36px;
    height: 36px;
    font-size: 18px;
}

.btn-circle.btn-lg {
    width: 56px;
    height: 56px;
    font-size: 28px;
}

/* Material Symbols icon styling */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 48;
    color: var(--material-icon-color);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .cost-categories {
        grid-template-columns: 1fr;
    }
    
    .bill-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .bill-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error messages */
.message {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Friend Tabs */
.friend-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
    gap: 0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 4px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #4a5568; /* fallback for var(--text-muted) */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    border-radius: 6px;
    margin: 0 2px;
}

.tab-button:hover {
    color: #059669; /* fallback for var(--primary-green) */
    background: #f7fafc; /* fallback for var(--background-light) */
}

.tab-button.active {
    color: #059669; /* fallback for var(--primary-green) */
    border-bottom-color: #059669; /* fallback for var(--primary-green) */
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Help Text */
.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Invite Form Styles */
.invite-friend-form .form-group {
    margin-bottom: 20px;
}

.invite-friend-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.invite-friend-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.invite-friend-form textarea::placeholder {
    color: var(--text-light);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.status-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-published {
    background: #fef3c7;
    color: #d97706;
}

.status-completed {
    background: #d1fae5;
    color: #059669;
}

.status-archived {
    background: #e5e7eb;
    color: #6b7280;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* Bill Participants Progress */
.bill-participants {
    margin: 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.participants-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.participants-info i {
    color: #6b7280;
}

.participants-info span {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Button Variants */
.btn-circle.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-circle.btn-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

.btn-circle.btn-secondary {
    background: #6b7280;
    color: white;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.btn-circle.btn-secondary .material-symbols-outlined {
    color: white !important;
}

.btn-circle.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.5);
    border-color: #f9fafb;
}

.btn-circle.btn-success {
    background: #10b981;
    color: white;
}

.btn-circle.btn-success .material-symbols-outlined {
    color: white !important;
}

.btn-circle.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-circle.btn-info {
    background: #3b82f6;
    color: white;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-circle.btn-info .material-symbols-outlined {
    color: white !important;
}

.btn-circle.btn-info:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    border-color: #eff6ff;
}

/* QR Modal Updates */
.qr-modal .qr-code-display {
    text-align: center;
    margin: 20px 0;
}

.qr-modal .qr-code-display img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.qr-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.qr-actions .btn-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

/* Bill Tabs */
.bill-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
    padding: 0 4px;
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    margin: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.tab-button:hover {
    background: #e2e8f0;
    color: #374151;
}

.tab-button.active {
    background: white;
    color: var(--primary-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.tab-count {
    background: #e2e8f0;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.tab-button.active .tab-count {
    background: var(--primary-green);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Archive Button Styles */
.btn-archive {
    background: #6b7280;
    color: white;
}

.btn-archive:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-archive:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Bill State Transitions */
.bill-item.archiving {
    opacity: 0.6;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

.bill-item.archived {
    opacity: 0.7;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* Empty State for History Bills */
#historyBillsList .no-bills {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px 20px;
}

/* Friend Selection Overlay */
.friend-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.friend-selection-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.friend-selection-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.friend-selection-header h3 {
    margin: 0;
    color: #1a202c;
    font-size: 20px;
    font-weight: 600;
}

.friend-selection-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.available-friends {
    margin-bottom: 24px;
}

.available-friends h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.available-friends-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f9fafb;
}

.no-selection {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
    margin: 0;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

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

.friend-item:hover {
    background: #f3f4f6;
}

.friend-item.already-added {
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    opacity: 0.8;
}

.friend-item.already-added:hover {
    background: #e0f2fe;
}

.friend-add-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.friend-add-btn:hover {
    background: var(--primary-green-dark);
    transform: scale(1.1);
}

.btn-select-friend {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-select-friend:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Current User Item Styling */
.current-user-item {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 12px;
    margin-bottom: 12px;
}

.current-user-item:hover {
    background: #ecfdf5;
    border-color: #059669;
}

.current-user-avatar {
    background: #10b981 !important;
    color: white !important;
    font-weight: 700;
}

.friend-add-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.friend-status-added {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #166534;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #bbf7d0;
    margin-left: auto;
    flex-shrink: 0;
}

.friend-status-added i {
    font-size: 10px;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.friend-name {
    font-weight: 500;
    color: #1a202c;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-email {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-selection-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8fafc;
}

/* Delete Confirmation Overlay */
.delete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.delete-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 450px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delete-header {
    padding: 32px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #fee2e2;
}

.delete-header h2 {
    color: #dc2626;
    font-size: 24px;
    margin-top: 12px;
    font-weight: 700;
}

.delete-content {
    padding: 24px;
    text-align: center;
}

.delete-content p {
    color: #4b5563;
    font-size: 15px;
    margin-bottom: 12px;
}

.delete-content .bill-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 18px;
    margin: 16px 0;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
}

.delete-content .warning-text {
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    margin-top: 16px;
}

.delete-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f9fafb;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.delete-footer .btn-secondary {
    background: #6b7280;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.delete-footer .btn-secondary:hover {
    background: #4b5563;
}

.delete-footer .btn-danger {
    background: #dc2626;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.delete-footer .btn-danger:hover {
    background: #b91c1c;
}

/* Friend Tags on Bill Cards */
.bill-friends {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.friend-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #475569;
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    min-height: 44px;
}

.friend-badge:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.friend-badge .friend-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.friend-badge .friend-name {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-badge .remove-btn {
    background: #374151;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.friend-badge .remove-btn:hover {
    background: #1f2937;
    transform: scale(1.1);
}

.no-friends {
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
    margin: 8px 0;
}

/* Add Friend Button */
.add-friends-btn {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.add-friends-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
    transform: translateY(-1px);
}

/* Real-time Update Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.bill-card {
    transition: all 0.3s ease;
}

.bill-card.updating {
    animation: pulse 0.6s ease-in-out;
}
