/* Mobile-First CSS - Better Shopping App */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #1a202c;
    line-height: 1.6;
    font-weight: 400;
}

* {
    box-sizing: border-box;
}

/* Remove unwanted outlines while preserving accessibility */
h1, h2, h3, h4, h5, h6 {
    outline: none !important;
}

/* Remove focus outlines from non-interactive elements */
*:not(input):not(textarea):not(select):not(button):not(a):not([tabindex]):focus {
    outline: none !important;
}

/* Ensure interactive elements still have proper focus states */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Layout - Mobile First */
.page {
    min-height: 100vh;
    padding-top: 76px; /* Account for fixed navbar */
}

.main-content {
    padding: 2rem 1rem;
    min-height: calc(100vh - 76px);
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation */
.navbar-dark {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #2d3748 !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    font-weight: 500;
    border-radius: 12px;
    margin: 0 0.25rem;
    padding: 0.75rem 1rem !important;
    color: #4a5568 !important;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1 !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Fix for user display text color */
.navbar-nav .navbar-text,
.navbar-nav .nav-item .nav-link {
    color: #4a5568 !important;
}

.navbar-nav .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar-nav .dropdown-item {
    color: #4a5568 !important;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: #6366f1 !important;
}

/* Cards and Containers */
.card {
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.9);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.shopping-list-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.shopping-list-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    border-radius: 16px;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

.btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* Fix for navbar buttons */
.navbar .btn-outline-light {
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #4a5568 !important;
    background: transparent;
    font-weight: 500;
}

.navbar .btn-outline-light:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #6366f1 !important;
}

.navbar .btn-outline-light:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    color: #6366f1 !important;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Mobile-First Shopping List Grid */
.shopping-lists-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Shopping Item Styles */
.shopping-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.shopping-item:hover {
    background-color: #f8f9fa;
}

.shopping-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

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

.item-name {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.25rem;
}

.item-details {
    font-size: 0.875rem;
    color: #6c757d;
}

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

.item-actions .btn {
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Add Item Section */
.add-item-section {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.add-item-toggle {
    border-radius: 6px;
    width: auto;
    min-width: 40px;
}

.add-item-form-container {
    width: 100%;
}

.add-item-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.add-item-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-item-inputs .input-group {
    display: flex;
    gap: 0.5rem;
}

.add-item-inputs .input-group .form-control {
    flex: 1;
}

.add-item-inputs .quantity-input {
    max-width: 80px;
    flex: none;
}

.note-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.note-input-group .form-control {
    flex: 1;
    min-width: 0; /* Allow input to shrink */
}

.note-input-group .btn {
    flex-shrink: 0;
    width: auto;
    min-width: 32px;
}

.add-note-btn {
    align-self: flex-start;
}

.add-item-form {
    padding: 1rem;
    background: white;
}

.add-item-form.collapsed {
    display: none;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Stats and Metrics */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    display: block;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alerts and Messages */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (min-width: 576px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .shopping-lists-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .add-item-form .row > div {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 992px) {
    .container-fluid {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Profile Page Styles */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-title {
    color: #343a40;
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

@media (max-width: 576px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Home Page Styles */
.welcome-header {
    text-align: center;
    margin: 2rem 0;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.welcome-header h1 {
    color: #1a202c;
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.welcome-header .lead {
    color: #4a5568;
    font-size: 1.3rem;
    margin-bottom: 0;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.dashboard-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.dashboard-card h3 {
    color: #1a202c;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    z-index: 2;
}

.dashboard-card .card-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1rem 0;
    position: relative;
    z-index: 2;
}

.dashboard-card .card-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6366f1;
    margin: 0.5rem 0;
    position: relative;
    z-index: 2;
}

.dashboard-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.dashboard-card .card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

.dashboard-card .btn {
    margin-top: auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 32px;
    color: white;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="1000,100 1000,0 0,0 0,100 200,50 400,80 600,40 800,70"></polygon></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.95;
    color: #e2e8f0;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.85;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #cbd5e0;
}

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

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.feature-card .feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h5 {
    color: #343a40;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #28a745;
}

.invalid {
    outline: 1px solid #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Error UI */
#blazor-error-ui {
    background: #ffeb3b;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: black;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Mobile-specific overrides */
@media (max-width: 767px) {
    .welcome-header h1 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .dashboard-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .d-flex.justify-content-between .btn,
    .d-flex.justify-content-between a {
        width: 100%;
        text-align: center;
    }
}

/* Utility classes for mobile */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.me-2 { margin-right: 0.5rem; }
.ms-2 { margin-left: 0.5rem; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.flex-column { flex-direction: column; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Hidden class */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Shopping List Detail Page Styles */
.list-detail-header {
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.list-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.list-description {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.shopping-items-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #007bff;
}

.section-header h3, .section-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-message {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

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

.items-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shopping-item-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.shopping-item-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
}

.item-quantity {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.item-note-inline {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.item-added-by {
    font-size: 0.8rem;
    color: #8e8e93;
}

.pending-badge-inline {
    background: #ffeaa7;
    color: #d63031;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

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

.item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #8e8e93;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
}

.pending-badge {
    background: #ffeaa7;
    color: #d63031;
    padding: 0.1rem 0.4rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Completed Items */
.completed-items-section {
    margin-bottom: 2rem;
}

.completed-items-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.completed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    gap: 0.75rem;
}

.completed-item-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent content from overflowing */
}

.completed-name {
    text-decoration: line-through;
    font-weight: 500;
    flex: 1;
    min-width: 0; /* Allow text to truncate if needed */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.completed-qty {
    font-size: 0.8rem;
    color: #8e8e93;
    flex-shrink: 0;
    white-space: nowrap;
}

.completed-by {
    font-size: 0.8rem;
    color: #8e8e93;
    flex-shrink: 0;
    white-space: nowrap;
}

.restore-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sharing Section */
.sharing-section {
    margin-bottom: 2rem;
}

.shared-users-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shared-user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.shared-user-info {
    flex: 1;
}

.shared-user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #2c3e50;
}

.shared-user-email {
    font-size: 0.8rem;
    color: #6c757d;
}

.access-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.access-badge.read-write {
    background: #d4edda;
    color: #155724;
}

.access-badge.read-only {
    background: #d1ecf1;
    color: #0c5460;
}

/* App Loading Styles */
.app-loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.app-loading-content {
    text-align: center;
    color: white;
}

.shopping-cart-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cart-icon {
    font-size: 3rem;
    animation: cart-bounce 1.5s ease-in-out infinite;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: dot-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
    animation: text-fade 2s ease-in-out infinite;
}

@keyframes cart-bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes text-fade {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modern gradient text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated background */
.animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}
