/* MeDigital - Home Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* ============================================
   DESIGN SYSTEM STANDARDS
   ============================================ */

/* CSS Custom Properties - Design Tokens */
:root {
    /* Colors */
    --color-primary: #f9d71c;
    --color-primary-dark: #dbb42c;
    --color-secondary: #333;
    --color-text: #333;
    --color-text-light: #666;
    --color-background: #f8f9fa;
    --color-white: #ffffff;
    --color-border: #dee2e6;
    --color-error: #dc3545;
    --color-success: #28a745;
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    --spacing-3xl: 4rem;      /* 64px */
    
    /* Page Padding (for fixed navbar) */
    --navbar-height: 80px;
    --page-padding-top: 100px; /* navbar height + 20px gap */
    
    /* Typography Scale */
    --font-size-xs: 0.75rem;  /* 12px */
    --font-size-sm: 0.875rem; /* 14px */
    --font-size-base: 1rem;   /* 16px */
    --font-size-lg: 1.125rem; /* 18px */
    --font-size-xl: 1.25rem;  /* 20px */
    --font-size-2xl: 1.5rem;  /* 24px */
    --font-size-3xl: 2rem;    /* 32px */
    --font-size-4xl: 2.5rem;  /* 40px */
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 15px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   1. PAGE PADDING & SPACING STANDARDS
   ============================================ */

/* Standard page container with navbar spacing */
.page-container {
    padding-top: var(--page-padding-top);
    padding-bottom: var(--spacing-3xl);
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Content wrapper for centered layouts */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Spacing utilities */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-2xl { margin-top: var(--spacing-2xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* ============================================
   2. CARD & CONTAINER STANDARDS
   ============================================ */

/* Standard card component */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
}

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

/* Card variants */
.card-flat {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--spacing-lg);
}

.card-bordered {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-primary);
    padding: var(--spacing-lg);
}

/* Card header */
.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

/* Card body */
.card-body {
    padding: var(--spacing-lg);
}

/* Card footer */
.card-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

/* ============================================
   3. BUTTON COMPONENT STANDARDS
   ============================================ */

/* Base button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary button */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

/* Secondary button */
.btn-secondary {
    background: var(--color-white);
    color: var(--color-secondary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Outline button */
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Text button */
.btn-text {
    background: transparent;
    color: var(--color-primary);
    padding: 0.5rem 1rem;
}

.btn-text:hover:not(:disabled) {
    background: rgba(249, 215, 28, 0.1);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: var(--font-size-xl);
}

/* Full width button */
.btn-block {
    width: 100%;
}

/* ============================================
   4. TYPOGRAPHY HIERARCHY STANDARDS
   ============================================ */

/* Heading styles */
h1, .h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

h2, .h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

h3, .h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

h4, .h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

h5, .h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

h6, .h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

/* Body text */
p, .body {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

/* Text utilities */
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.text-light { color: var(--color-text-light); }
.text-primary { color: var(--color-primary); }
.text-white { color: var(--color-white); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Responsive typography */
@media (max-width: 768px) {
    h1, .h1 { font-size: var(--font-size-3xl); }
    h2, .h2 { font-size: var(--font-size-2xl); }
    h3, .h3 { font-size: var(--font-size-xl); }
    
    .page-container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

/* ============================================
   END OF DESIGN SYSTEM STANDARDS
   ============================================ */

/* Navbar Skeleton - Anti-Flicker Loading State */
.navbar-skeleton {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    z-index: 3000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

/* Navigation
   IMPORTANT: do NOT put backdrop-filter on .navbar itself — it creates a containing
   block for position:fixed descendants and breaks mobile drawer hit-testing (taps
   fall through to #mobileMenuOverlay and only close the sheet). Blur lives on ::before. */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 3000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    z-index: -1;
}

.nav-container {
    width: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* On mobile, reduce padding for better space utilization */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand h1 {
    color: #f9d71c;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* User Welcome Message - positioned after Transactions brand */
.nav-brand .user-welcome {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* On smaller screens, hide welcome message to prevent clutter */
@media (max-width: 1024px) {
    .nav-brand .user-welcome {
        max-width: 150px;
        font-size: 0.85rem;
    }
}

/* On mobile, hide welcome message completely */
@media (max-width: 768px) {
    .nav-brand .user-welcome {
        display: none !important;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #f9d71c;
}

/* Active state for current page */
.nav-link.active {
    color: #f9d71c;
    font-weight: 600;
    position: relative;
    cursor: default;
    pointer-events: none; /* Prevents clicking on active link */
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #f9d71c;
    border-radius: 2px;
}

/* Active state for dropdown toggle buttons */
.dropdown-toggle.active {
    color: #f9d71c;
    font-weight: 600;
}

/* Active state for dropdown items */
.dropdown-item.active {
    color: #f9d71c;
    font-weight: 600;
    background: rgba(249, 215, 28, 0.1);
    cursor: default;
    pointer-events: none; /* Prevents clicking on active dropdown item */
}

/* Active state for dropdown container (menu open) */
.nav-dropdown.active > .dropdown-toggle {
    color: #f9d71c;
    font-weight: 600;
}

/* Current page indicator for dropdown toggle (e.g., when already on Product Journey or Reviews page)
   This visually highlights the section without forcing the dropdown menu to stay open. */
.dropdown-toggle.current-page {
    color: #f9d71c;
    font-weight: 600;
}

.nav-cta {
    background: linear-gradient(135deg, #f9d71c, #dbb42c);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    color: white !important;
}

.btn-signin {
    background: transparent;
    border: 2px solid #f9d71c;
    color: #f9d71c;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-signin:hover {
    background: #f9d71c;
    color: white;
}

/* Auth Section - Push to right edge on desktop */
.nav-links .auth-section {
    margin-left: auto !important;
}

/* User Menu - Push to right edge on desktop (when logged in) */
.nav-links .user-menu {
    margin-left: auto !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f9d71c 0%, #dbb42c 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0 0 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: #f9d71c;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #f9d71c;
}

/* Fix contrast for modal buttons */
.modal .btn-secondary {
    background: transparent;
    color: #f9d71c;
    border: 2px solid #f9d71c;
    font-weight: 600;
}

.modal .btn-secondary:hover {
    background: #f9d71c;
    color: white;
}

/* Hero Card */
.hero-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: rotate(3deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: rotate(0deg);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.list-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-item-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.check {
    color: #28a745;
    font-weight: bold;
    margin-right: 1rem;
}

.price {
    color: #f9d71c;
    font-weight: 600;
}

.feature-icon {
    color: #f9d71c;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Professional Card Styling */
.hero-card.professional {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 1.8rem;
}

.professional-header {
    border-bottom: 2px solid #f0f1f3;
    padding-bottom: 1rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.professional-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.card-subtitle {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.4rem 0;
}

.feature-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f9d71c, #dbb42c);
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.feature-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2;
}

.feature-desc {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 400;
    line-height: 1.3;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: white;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
}

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

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

/* Feature card as link - remove default link styling */
.feature-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

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

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

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

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

/* Stats Section */
.stats {
    background: linear-gradient(135deg, #f9d71c 0%, #dbb42c 100%);
    padding: 4rem 0;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #f9d71c;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.about-features {
    margin-top: 2rem;
}

.about-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.feature-check {
    color: #28a745;
    font-weight: bold;
    margin-right: 1rem;
}

/* Dashboard Preview */
.dashboard-preview {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

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

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

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}

.preview-title {
    font-weight: 600;
    color: #333;
}

.preview-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.preview-stat {
    text-align: center;
}

.preview-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9d71c;
}

.preview-stat .stat-label {
    font-size: 0.9rem;
    color: #666;
}

.preview-chart {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    height: 100px;
}

.chart-bar {
    background: linear-gradient(135deg, #f9d71c, #dbb42c);
    width: 20px;
    border-radius: 3px;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #333, #555);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* Button styling for CTA buttons */
button.btn {
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

button.btn-primary {
    background: white;
    color: #f9d71c;
}

button.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Footer */
#footer-root {
    width: 100%;
    margin-top: auto;
}

.footer {
    background: #333;
    color: white;
    padding: 1.5rem 0 1rem 0;
}

/* Footer container should not inherit page padding from global .container */
.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-items: start;
    align-items: start;
    width: 100%;
}

.footer-brand {
    grid-column: 1;
    width: 100%;
}

.footer-brand h3 {
    color: #f9d71c;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #f7dc6f;
    opacity: 0.9;
}

.footer-links {
    display: contents;
}

.footer-links .footer-section:first-child {
    grid-column: 2;
    width: 100%;
}

.footer-links .footer-section:nth-child(2) {
    grid-column: 3;
    width: 100%;
}

.footer-links .footer-section:nth-child(3),
.footer-links .footer-section.footer-section-legal {
    grid-column: 4;
    width: 100%;
}

.footer-content--legal {
    grid-template-columns: 1fr 1fr 1fr;
}

.footer-content--legal .footer-links .footer-section:first-child {
    grid-column: 2;
}

.footer-content--legal .footer-links .footer-section:nth-child(2) {
    grid-column: 3;
}

.footer--compact {
    padding: 1rem 0 calc(0.75rem + env(safe-area-inset-bottom, 0px));
    margin-top: auto;
}

.footer--compact .container {
    text-align: center;
}

.footer-compact-brand {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f9d71c;
}

.footer-compact-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.footer-compact-legal a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.8125rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.footer-compact-legal a:hover {
    color: #f9d71c;
}

.footer-compact-copy {
    margin: 0;
    font-size: 0.75rem;
    color: #f7dc6f;
    opacity: 0.85;
}

.footer-section h4 {
    color: #f9d71c;
    margin-bottom: 1rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #f9d71c;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #f7dc6f;
    opacity: 0.9;
}

.footer-bottom p {
    color: #f7dc6f;
    opacity: 0.9;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    /* Start centered from the beginning - set initial state explicitly */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95); /* Start slightly smaller and centered */
    opacity: 0; /* Start invisible */
    /* Animation - only animate opacity and scale, X and Y stay centered */
    animation: modalFadeIn 0.3s ease forwards;
    margin: 0;
}

/* Exclude transaction-modal and product-modal from absolute positioning - they use flexbox layout */
.transaction-modal .modal-content,
.product-modal .modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
}

/* Separate animation for modal to ensure it stays centered */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95); /* X and Y stay at -50% (centered), only scale animates */
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1); /* Full size and centered */
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.auth-form {
    padding: 3rem;
}

.auth-form h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
    text-align: center;
}

.auth-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #f9d71c;
}

.btn-full {
    width: 100%;
}

/* Ensure proper contrast for all modal buttons */
.modal .btn-primary {
    background: #f9d71c;
    color: white;
    border: 2px solid #f9d71c;
}

.modal .btn-primary:hover {
    background: #dbb42c;
    border-color: #dbb42c;
    transform: translateY(-2px);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #666;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* .user-welcome styles moved to .nav-brand .user-welcome (see above) */

.btn-signout {
    background: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-signout:hover {
    background: #dc3545;
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 3001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Styles — drawer sheet (logic/IDs unchanged; mobile layout only) */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        border-radius: 10px;
        border: 2px solid transparent;
        background: transparent;
        transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    /* When drawer is open, hamburger reads as a clear close control */
    .mobile-menu-btn.active {
        background: #fff;
        border-color: #e5e7eb;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    }

    .mobile-menu-btn.active span {
        background-color: #1f2937;
    }
    
    /* Solid header on small screens — avoid any filter/blur trapping fixed drawer */
    .navbar {
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .navbar::before {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -105%;
        width: min(86vw, 320px);
        height: 100vh;
        height: 100dvh;
        background: #fff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0.15rem;
        padding:
            max(4.75rem, calc(env(safe-area-inset-top, 0px) + 3.75rem))
            1.15rem
            max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1rem))
            1.15rem;
        transition: right 0.3s ease;
        box-shadow: -6px 0 28px rgba(15, 23, 42, 0.14);
        border-left: 1px solid #eef0f2;
        z-index: 3010;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto;
    }
    
    .nav-links.mobile-active {
        right: 0;
    }

    .mobile-menu-btn {
        position: relative;
        z-index: 3020;
    }
    
    /* Direct nav links (Dashboard) */
    .nav-links > .nav-link {
        width: 100%;
        padding: 0.9rem 0.9rem;
        margin: 0;
        border-bottom: none;
        border-radius: 10px;
        font-size: 1.05rem;
        font-weight: 600;
        color: #1f2937;
        text-decoration: none;
        display: block;
        box-sizing: border-box;
        transition: background 0.2s ease, color 0.2s ease;
    }

    /* Auth-gated links hidden by JS must stay hidden (inline style alone loses to display: block above on some browsers) */
    .nav-links > .nav-link.nav-auth-hidden {
        display: none !important;
    }
    
    .nav-links > .nav-link:hover {
        color: #1f2937;
        background: rgba(249, 215, 28, 0.14);
        padding-left: 0.9rem;
    }
    
    .nav-links > .nav-link.active {
        color: #1f2937;
        font-weight: 700;
        background: rgba(249, 215, 28, 0.22);
        border-left: 3px solid #f9d71c;
        padding-left: calc(0.9rem - 3px);
    }
    
    .nav-links > .nav-link.active::after {
        display: none; /* Hide underline on mobile */
    }
    
    /* Dropdowns in mobile */
    .nav-dropdown {
        width: 100%;
        border-bottom: none;
        margin: 0;
    }
    
    .nav-dropdown .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 0.9rem 0.9rem;
        font-size: 1.05rem;
        font-weight: 600;
        text-align: left;
        border-radius: 10px;
        color: #1f2937;
        box-sizing: border-box;
    }

    .nav-dropdown .dropdown-toggle:hover,
    .nav-dropdown.active .dropdown-toggle {
        background: rgba(249, 215, 28, 0.12);
    }
    
    .nav-dropdown .dropdown-menu {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
        background: #f8fafc;
        border: 1px solid #eef0f2;
        border-radius: 10px;
        margin: 0.25rem 0 0.5rem;
        padding: 0.25rem 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .nav-dropdown .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.98rem;
        border-radius: 8px;
        margin: 0 0.35rem;
    }

    .nav-dropdown .coming-soon,
    .nav-dropdown .coming-soon--nav {
        font-size: 0.7rem;
        font-weight: 600;
        opacity: 0.85;
    }
    
    /* Right side container in mobile — account / admin block */
    .nav-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #eef0f2;
        gap: 0.75rem;
    }
    
    .btn-settings {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .nav-right .btn-admin {
        width: 100%;
        justify-content: flex-start;
        min-height: 48px;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background: #fff;
        color: #374151;
        font-weight: 600;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    }

    .nav-right .btn-admin:hover {
        border-color: #f9d71c;
        background: #fffef5;
        color: #1f2937;
    }
    
    /* Account dropdown in mobile */
    .account-dropdown {
        width: 100%;
    }
    
    .account-dropdown .btn-account {
        width: 100%;
        justify-content: space-between;
        min-height: 48px;
        padding: 0.85rem 1.1rem;
        border-radius: 12px;
        font-size: 1rem;
        box-shadow: 0 2px 8px rgba(249, 215, 28, 0.35);
    }
    
    .account-dropdown .dropdown-card {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
        border: 1px solid #eef0f2;
        margin-top: 0.5rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-radius: 12px;
    }
    
    .account-dropdown.active .dropdown-card {
        max-height: 70vh;
    }
    
    /* Legacy styles for compatibility */
    .nav-links .auth-section {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        margin-left: 0;
        padding-top: 1rem;
        border-top: 1px solid #eef0f2;
    }
    
    .nav-links .user-menu {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        margin-left: 0;
        padding-top: 1rem;
        border-top: 1px solid #eef0f2;
    }
    
    .nav-links .btn-signin,
    .nav-links .btn-signout {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .nav-links .nav-cta {
        width: 100%;
        text-align: center;
        padding: 12px;
        margin: 0;
    }

    /* Dim page behind drawer — must stay BELOW .navbar (3000) so burger stays tappable */
    .mobile-menu-overlay {
        z-index: 2990;
        background: rgba(15, 23, 42, 0.42);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        pointer-events: auto;
    }
}

/* Mobile Menu Overlay (base). Mobile block above sets 2990; keep base ≤ navbar. */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2990;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Brand Link Styling */
.nav-brand .brand-link {
    text-decoration: none;
    color: inherit;
}

.nav-brand .brand-link:hover h1 {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: transparent;
    border: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    transition: color 0.3s ease;
}

.dropdown-toggle:hover {
    color: #f9d71c;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Simple Dropdown Menu (for Insights & Community) */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 3010; /* Higher than navbar (3000) to ensure dropdowns appear above all content */
    padding: 0.5rem 0;
}

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Re-assert mobile accordion after desktop dropdown rules (same-specificity cascade) */
@media (max-width: 768px) {
    .nav-dropdown .dropdown-menu {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
        background: #f8fafc;
        border: 1px solid #eef0f2;
        border-radius: 10px;
        margin: 0.25rem 0 0.5rem;
        padding: 0.25rem 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        pointer-events: auto;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }

    .account-dropdown .dropdown-card {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        pointer-events: auto;
    }

    .account-dropdown.active .dropdown-card {
        max-height: 70vh;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-overlay {
        z-index: 2990;
    }

    /* Portaled drawer (body) must sit above overlay; header/burger stay at 3000+ */
    .nav-links,
    .nav-links.mobile-drawer-portaled {
        z-index: 3010;
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.dropdown-item:hover:not(.disabled) {
    background: #f8f9fa;
    color: #f9d71c;
}

.dropdown-item.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.dropdown-item .coming-soon {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    background: #e9ecef;
    border-radius: 10px;
    color: #6c757d;
}

/* Insights nav — temporarily inactive */
.nav-dropdown--inactive > .dropdown-toggle {
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.72;
    pointer-events: none;
}

.nav-dropdown--inactive > .dropdown-toggle .coming-soon--nav {
    margin-left: 0.4rem;
    font-size: 0.65rem;
    padding: 0.12rem 0.45rem;
    background: #e9ecef;
    border-radius: 10px;
    color: #6c757d;
    font-weight: 600;
    vertical-align: middle;
}

.nav-dropdown--inactive > .dropdown-toggle .dropdown-arrow {
    opacity: 0.45;
}

/* Right Side Navigation Container */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Admin Button Styling (replaces old Settings button) */
.btn-admin {
    background: transparent;
    color: #333;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-admin:hover {
    background: #f8f9fa;
    border-color: #f9d71c;
    color: #f9d71c;
}

.btn-admin svg {
    width: 18px;
    height: 18px;
}

/* Legacy Settings Button Styling (for backward compatibility) */
.btn-settings {
    background: transparent;
    color: #333;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-settings:hover {
    background: #f8f9fa;
    border-color: #f9d71c;
    color: #f9d71c;
}

.btn-settings svg {
    width: 18px;
    height: 18px;
}

/* Account Dropdown Button */
.account-dropdown {
    position: relative;
}

.btn-account {
    background: #f9d71c;
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-account:hover {
    background: #dbb42c;
}

.btn-account .dropdown-arrow {
    stroke: white;
}

/* Dropdown Card (for Account Menu) */
.dropdown-card {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 3010; /* Higher than navbar (3000) to ensure dropdown appears above all content */
    overflow: hidden;
}

.account-dropdown.active .dropdown-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-card-content {
    padding: 0.5rem 0;
}

/* Dropdown Card Header (for logged in users) */
.dropdown-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f9d71c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown Card Items */
.dropdown-card-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.dropdown-card-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-card-item:hover:not(.disabled) {
    background: #f8f9fa;
    color: #f9d71c;
}

.dropdown-card-item:hover:not(.disabled) svg {
    stroke: #f9d71c;
}

.dropdown-card-item.disabled {
    color: #999;
    cursor: not-allowed;
}

.dropdown-card-item .coming-soon {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    background: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 500;
}

/* Dropdown Card Divider */
.dropdown-card-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

/* Dropdown Card Footer */
.dropdown-card-footer {
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
}

.btn-signout-dropdown {
    width: 100%;
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-signout-dropdown:hover {
    background: #dc3545;
    color: white;
}

.btn-signout-dropdown svg {
    width: 16px;
    height: 16px;
}

/* Legacy button styles for compatibility */
.btn-signout {
    background: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-signout:hover {
    background: #dc3545;
    color: white;
}

/* Account Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-container {
    background: white;
    border-radius: 20px;
    width: 90vw;
    max-width: 1200px;
    max-height: 85vh;
    overflow: auto;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 3px #17a2b8;
    animation: slideInUp 0.3s ease;
    border: 2px solid #17a2b8;
    box-sizing: border-box;
    /* Custom scrollbar styling to keep arrows inside border */
    scrollbar-width: thin;
    scrollbar-color: #17a2b8 transparent;
}

/* Webkit scrollbar styling for Chrome/Safari */
.settings-container::-webkit-scrollbar {
    width: 8px;
}

.settings-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
    margin: 25px 0;
}

.settings-container::-webkit-scrollbar-thumb {
    background: #17a2b8;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.settings-container::-webkit-scrollbar-thumb:hover {
    background: #138496;
    background-clip: content-box;
}

.settings-container::-webkit-scrollbar-button {
    background: #17a2b8;
    border-radius: 8px;
    height: 16px;
    width: 8px;
}

.settings-container::-webkit-scrollbar-button:hover {
    background: #138496;
}

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

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 1.5rem) clamp(1.5rem, 3vw, 3rem);
    border-bottom: 2px solid #f0f1f3;
}

.settings-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.close-settings {
    background: #e0e0e0;
    border: 2px solid #ccc;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
    opacity: 1 !important;
    visibility: visible !important;
}

.close-settings:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.settings-content {
    padding: clamp(1.5rem, 3vw, 3rem);
}

.setting-group {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* Preference Item Styling */
.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.preference-header {
    flex: 1;
}

.preference-header label {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
}

.preference-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.preference-select {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.preference-select:hover {
    border-color: #f9d71c;
}

.preference-select:focus {
    outline: none;
    border-color: #f9d71c;
    box-shadow: 0 0 0 3px rgba(249, 215, 28, 0.1);
}

/* Subscription Info Styling */
.subscription-info {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.badge-icon {
    font-size: 1.5rem;
}

.badge-text {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.subscription-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.subscription-info .btn-primary {
    margin-top: 0.5rem;
}

.setting-group h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Professional Data Management Boxes */
.data-management-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    min-height: 100px;
    height: auto;
    width: 100%;
    box-sizing: border-box;
}

.data-management-content:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.data-text {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 240px);
}

.data-text strong {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.data-text p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.data-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    min-width: 220px;
    width: 220px;
    flex-shrink: 0;
}

.data-buttons .btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 44px;
    min-height: 44px;
}

.data-buttons .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.data-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.data-buttons .btn-secondary {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    border: none;
    width: 100%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.data-buttons .btn-secondary:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.data-buttons .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.data-buttons .btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1.25rem) 0;
    border-bottom: 1px solid #f5f5f5;
    width: 100%;
    box-sizing: border-box;
}

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

.setting-item label {
    font-weight: 600;
    color: #555;
}

.setting-item span {
    color: #666;
}

/* ==================== ADMIN CENTER UI ENHANCEMENTS ==================== */

/* Base Admin Section Styles */
.admin-section {
    border: 2px solid;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(248, 249, 250, 0.05) 100%);
}

.admin-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Remove default border-bottom from h3 in admin sections */
.admin-section h3 {
    border-bottom: none;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

/* Admin Section - Data Management (Blue) */
.admin-section-data-management {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.admin-section-data-management:hover {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* Admin Section - Products Management (Teal) */
.admin-section-products-management {
    border-color: #06b6d4;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
}

.admin-section-products-management:hover {
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}

/* Admin Section - Store Products Management (Indigo) */
.admin-section-store-products-management {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.admin-section-store-products-management:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

/* Admin Section - Transaction Management (Purple) */
.admin-section-transaction-management {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.admin-section-transaction-management:hover {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

/* Admin Section - Store Management (Green) */
.admin-section-store-management {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.admin-section-store-management:hover {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

/* Admin Section - Category Management (Orange) */
.admin-section-categories {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
}

.admin-section-categories:hover {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

/* Admin Section - NAICS (Indigo) */
.admin-section-naics {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.admin-section-naics:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

/* Admin Section - Insight Requests (Premium Gold) */
.admin-section-insight-requests {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 179, 0, 0.05) 100%);
}

.admin-section-insight-requests:hover {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

/* Admin Section - Pickup Queue (same gold tier pattern as Insight Requests) */
.admin-section-pickup-queue {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 179, 0, 0.05) 100%);
}

.admin-section-pickup-queue:hover {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

/* Admin Badge Base Styles */
.admin-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

/* Admin Badge - Data Management (Blue) */
.admin-badge-data-management {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Admin Badge - Products Management (Teal) */
.admin-badge-products-management {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

/* Admin Badge - Transaction Management (Purple) */
.admin-badge-transaction-management {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Admin Badge - Store Management (Green) */
.admin-badge-store-management {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Admin Badge - Category Management (Orange) */
.admin-badge-categories {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Admin Badge - Store Products Management (Indigo) */
.admin-badge-store-products-management {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Admin Badge - NAICS (Indigo) */
.admin-badge-naics {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Gold tier badges — Pickup Queue (Store), Insight Requests (Premium), Premium Sections (Enterprise) */
.admin-badge-pickup-queue,
.admin-section-insight-requests .admin-badge-insight-requests,
.premium-section .premium-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Enhanced Admin Card Styles */
.admin-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Section-specific card border colors on hover */
.admin-section-data-management .admin-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.admin-section-products-management .admin-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
}

.admin-section-store-products-management .admin-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.admin-section-transaction-management .admin-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

.admin-section-store-management .admin-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.admin-section-naics .admin-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.admin-section-insight-requests .admin-card:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.15);
}

.admin-section-pickup-queue .admin-card:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.15);
}

/* Admin Button Styles - Data Management (Blue) */
.btn-data-management {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-data-management:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
}

/* Admin Button Styles - Products Management (Teal) */
/* Category Management button (Orange) */
.btn-categories {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-categories:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.admin-section-categories .admin-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.btn-products-management {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-products-management:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4) !important;
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%) !important;
}

/* Admin Button Styles - Transaction Management (Purple) */
.btn-transaction-management {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-transaction-management:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
}

/* Admin Button Styles - Store Management (Green) */
.btn-store-management {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-store-management:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
}

/* Admin Button Styles - NAICS (Indigo) */
/* Admin Button Styles - Store Products Management (Indigo) */
.btn-store-products-management {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-store-products-management:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%) !important;
}

.btn-naics-management {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
}

.btn-naics-management:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%) !important;
}

/* Admin Button Styles - Insight Requests (Premium Gold) */
.btn-insight-requests,
.btn-pickup-queue,
.data-buttons .btn-insight-requests,
.data-buttons .btn-pickup-queue,
.data-buttons a.btn-insight-requests,
.data-buttons a.btn-pickup-queue {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%) !important;
    color: #333 !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    border: none !important;
    width: 100%;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-insight-requests:hover,
.btn-pickup-queue:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4) !important;
    background: linear-gradient(135deg, #ffed4e 0%, #ffc700 100%) !important;
}

/* Responsive adjustments for admin sections */
@media (max-width: 768px) {
    .admin-section {
        padding: 15px;
        margin-top: 15px;
        margin-bottom: 20px;
    }
    
    .admin-badge {
        font-size: 9px;
        padding: 3px 10px;
        margin-left: 8px;
    }
    
    .admin-section h3 {
        font-size: 1.1rem;
    }
}

/* Danger Zone Styling */
.danger-zone {
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 1.5rem;
    background: #fff5f5;
}

.danger-zone h3 {
    color: #dc3545;
    border-bottom-color: #dc3545;
}

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

.danger-text strong {
    color: #dc3545;
    font-size: 1.1rem;
}

.danger-text p {
    color: #666;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Delete Account Modal Styling */
.delete-modal {
    max-width: 520px;
    margin: 2rem;
}

.delete-modal-content {
    padding: 2rem;
}

.delete-modal-content h3 {
    color: #dc3545;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.4rem;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.warning-box p {
    margin: 0 0 1.2rem 0;
    color: #856404;
    font-size: 1rem;
    line-height: 1.5;
}

.warning-box p:last-of-type {
    margin-bottom: 1.5rem;
}

.warning-box ul {
    margin: 0 0 0 1.5rem;
    color: #856404;
    padding-left: 0;
}

.warning-box li {
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.confirmation-section {
    margin-top: 2rem;
}

.confirmation-section p {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group input[type="password"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input[type="password"]:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 2rem;
    text-align: left;
}

.checkbox-container input[type="checkbox"] {
    margin-top: 0.2rem;
    transform: scale(1.2);
    flex-shrink: 0;
}

/* Removed duplicate modal-buttons definition - using the one below */

.modal-buttons .btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.modal-buttons .btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
}

.modal-buttons .btn-danger {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Forgot Password Link Styling */
.forgot-password-link {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-link {
    color: #f9d71c;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #dbb42c;
    text-decoration: underline;
}

/* CSV Import Styles */
.data-management-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.data-text {
    flex: 1;
}

.data-text strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1rem;
}

.data-text p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.data-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.csv-import-modal {
    max-width: 1200px !important;
    width: 90vw !important;
}

.csv-import-content {
    padding: 2.5rem 3rem 2.25rem;
}

@media (max-width: 768px) {
    .csv-import-modal {
        width: 95%;
        max-width: 95%;
    }
    
    .csv-import-content {
        padding: 1.75rem;
    }
}


.csv-import-content h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.5rem;
}

.modal-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.csv-format-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.csv-format-info p {
    margin: 0.5rem 0;
    color: #495057;
}

.csv-format-info strong {
    color: #333;
}

.csv-upload-area {
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.csv-upload-area:hover {
    border-color: #f9d71c;
    background: rgba(249, 215, 28, 0.05);
}

.csv-upload-area.dragover {
    border-color: #f9d71c;
    background: rgba(249, 215, 28, 0.1);
}

.upload-placeholder {
    color: #666;
}

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

.upload-placeholder p {
    margin: 0.5rem 0;
}

.upload-placeholder strong {
    color: #333;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 600;
    color: #333;
}

.file-size {
    font-size: 0.9rem;
    color: #666;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.csv-preview, .import-progress, .import-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.csv-preview h4, .import-progress h4, .import-results h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.preview-content {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.preview-line {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.preview-line:last-child {
    border-bottom: none;
}

.cell {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    min-width: 80px;
    text-align: center;
    font-size: 0.8rem;
}

.header-cell {
    background: #f9d71c;
    color: #333;
    font-weight: 600;
    border-color: #f0c14b;
}

.highlight-cell {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.preview-summary {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    color: #2e7d32;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #f9d71c, #f0c14b);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #333;
}

.results-content {
    color: #333;
    line-height: 1.5;
}

.results-content .success {
    color: #28a745;
    font-weight: 600;
}

.results-content .error {
    color: #dc3545;
    font-weight: 600;
}

.results-content .info {
    color: #17a2b8;
    font-weight: 600;
}

.enterprise-breakdown {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
}

.enterprise-breakdown h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
    text-align: center;
}

.collection-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    color: #28a745;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Validation Results Styles */
.validation-results {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.validation-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.validation-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

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

.validation-status.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.validation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.validation-stats .stat-item {
    padding: 12px;
    border-radius: 6px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    font-weight: 500;
    display: block;
}

.validation-stats .stat-item.success {
    border-left-color: #28a745;
    background: #d4edda;
}

.validation-stats .stat-item.error {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.validation-stats .stat-item.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.validation-stats .stat-item.info {
    border-left-color: #17a2b8;
    background: #d1ecf1;
}

.validation-issues,
.validation-duplicates,
.validation-recommendations {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
}

.validation-issues {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.validation-duplicates {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.validation-recommendations {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

.validation-issues h5,
.validation-duplicates h5,
.validation-recommendations h5 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.validation-issues ul,
.validation-duplicates ul,
.validation-recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.validation-issues li,
.validation-duplicates li,
.validation-recommendations li {
    margin-bottom: 5px;
    font-size: 14px;
}

.validation-actions {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.validation-success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    font-weight: 500;
}

.validation-warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    font-weight: 500;
}

/* Button Styles */
.btn-warning {
    background: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-warning:hover:not(:disabled) {
    background: #e0a800;
    border-color: #d39e00;
}

.btn-warning:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: 1px solid #17a2b8;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-info:hover:not(:disabled) {
    background: #138496;
    border-color: #117a8b;
}

.btn-info:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Modal Button Layout */
.modal-buttons {
    display: flex !important;
    gap: 15px;
    justify-content: center !important;
    margin-top: 25px;
    padding: 0 20px;
}

.modal-buttons .btn-secondary {
    flex: 0 0 auto;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-buttons .btn-warning {
    flex: 0 0 auto;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-buttons .btn-primary {
    flex: 0 0 auto;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .validation-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 12px;
        padding: 0 10px;
    }
    
    .modal-buttons button {
        width: 100%;
        padding: 14px 20px;
    }

    /* Account Settings Tablet Responsive */
    .settings-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .settings-header h2 {
        font-size: 1.3rem;
    }
    
    .danger-content {
        flex-direction: column;
        align-items: stretch;
    }

    /* Data Management Responsive */
    .data-management-content {
        flex-direction: column;
        gap: 1.5rem;
        height: auto;
        min-height: 120px;
    }
    
    .data-buttons {
        min-width: auto;
        width: 100%;
    }
    
    .data-text {
        max-width: 100%;
    }
    
    /* Footer Responsive - Stack columns on mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        grid-column: 1;
    }
    
    .footer-links .footer-section:first-child,
    .footer-links .footer-section:nth-child(2),
    .footer-links .footer-section:nth-child(3),
    .footer-links .footer-section.footer-section-legal {
        grid-column: 1;
    }

    .footer-content--legal {
        grid-template-columns: 1fr;
    }

    .footer-content--legal .footer-links .footer-section:first-child,
    .footer-content--legal .footer-links .footer-section:nth-child(2) {
        grid-column: 1;
    }
    
}

/* Mobile Responsive for Account Settings */
@media (max-width: 480px) {
    .settings-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .settings-header h2 {
        font-size: 1.1rem;
    }
    
    .close-settings {
        font-size: 1.25rem;
        width: 32px;
        height: 32px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================
   INTELLIGENCE BEACON - Floating Button & Side Panel
   ============================================ */

/* Beacon Pulse Animation */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(249, 215, 28, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(249, 215, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 215, 28, 0); }
}

/* Floating Button */
.beacon-floating-btn-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Field Tool drawer tab panels (scoped to #fieldToolPanel) */
#fieldToolPanel .field-tool-tab-content {
    display: none;
}

#fieldToolPanel .field-tool-tab-content.active {
    display: block;
}

.field-tool-auth-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 16px 0;
    padding: 0 4px;
}

.field-tool-auth-hint.signed-in {
    color: #4ade80;
}

.field-tool-panel-mount {
    min-height: 120px;
}

.field-tool-panel-mount code {
    font-size: 11px;
    color: #cbd5e1;
}

#fieldToolPanel .field-tool-intro-card h3 {
    margin: 0 0 8px 0;
}

/* Field Tool — mobile-style bottom tab bar (Grocery App01 MainTabs) */
#fieldToolPanel.field-tool-panel {
    display: flex;
    flex-direction: column;
}

/* Field Tool PWA: dynamic viewport + safe areas (basket drawer only) */
#fieldToolPanel.intelligence-beacon-panel {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

@supports not (height: 100dvh) {
    #fieldToolPanel.intelligence-beacon-panel {
        height: 100vh;
        max-height: 100vh;
    }
}

#fieldToolPanel .beacon-panel-header {
    padding-top: calc(32px + env(safe-area-inset-top, 0px));
    padding-right: calc(32px + env(safe-area-inset-right, 0px));
    padding-bottom: 32px;
    padding-left: calc(32px + env(safe-area-inset-left, 0px));
}

/* Compact single-row Field Tool header: [ < ] title · status / close */
#fieldToolPanel .field-tool-panel-header.beacon-panel-header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-right: calc(14px + env(safe-area-inset-right, 0px));
    padding-bottom: 12px;
    padding-left: calc(10px + env(safe-area-inset-left, 0px));
}

#fieldToolPanel .field-tool-panel-header .beacon-panel-title {
    min-width: 0;
}

#fieldToolPanel .field-tool-panel-header .beacon-panel-subtitle {
    margin: 0 0 2px 0;
    letter-spacing: 0.22em;
    line-height: 1.2;
}

#fieldToolPanel .field-tool-panel-header .beacon-panel-main-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    opacity: 0.92;
}

.field-tool-header-back {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #f9d71c;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.field-tool-header-back:hover {
    background: rgba(249, 215, 28, 0.14);
    border-color: rgba(249, 215, 28, 0.35);
    color: #ffe566;
}

.field-tool-header-back:focus-visible {
    outline: 2px solid rgba(249, 215, 28, 0.55);
    outline-offset: 2px;
}

.field-tool-header-back.hidden {
    display: none;
}

/* Field Tool FAB only (transactions.html PWA entry — not other pages/sections) */
body:has(#fieldToolPanel) .beacon-floating-btn-container {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
    #fieldToolPanel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    #fieldToolPanel textarea,
    #fieldToolPanel select {
        font-size: max(16px, 1em);
    }
}

#fieldToolPanel .field-tool-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 24px 12px;
}

#fieldToolPanel .field-tool-bottom-nav {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 4px;
    padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1d21;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

#fieldToolPanel .field-tool-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    padding: 6px 4px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

#fieldToolPanel .field-tool-nav-btn .field-tool-nav-icon {
    font-size: 20px;
    line-height: 1;
}

#fieldToolPanel .field-tool-nav-btn .field-tool-nav-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
}

#fieldToolPanel .field-tool-nav-btn.active,
#fieldToolPanel .field-tool-nav-btn.active .field-tool-nav-icon {
    color: #f9d71c;
}

#fieldToolPanel .field-tool-nav-btn.active {
    background: rgba(249, 215, 28, 0.08);
}

#fieldToolPanel .field-tool-nav-btn:hover:not(.active) {
    color: #94a3b8;
}

@media (max-width: 380px) {
    #fieldToolPanel .field-tool-nav-btn .field-tool-nav-label {
        font-size: 8px;
    }
}

/* Field Tool — Voice store cover (say store → shopping list) */
.ft-voice-store-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px 20px;
    min-height: 320px;
    justify-content: center;
    gap: 10px;
}

.ft-voice-store-cover.hidden {
    display: none;
}

.ft-shopping-main-hidden {
    display: none !important;
}

.ft-voice-cover-eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f9d71c;
}

.ft-voice-cover-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.25;
}

.ft-voice-cover-hint {
    margin: 0 0 8px;
    font-size: 13px;
    color: #94a3b8;
    max-width: 260px;
    line-height: 1.4;
}

.ft-voice-cover-mic {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 2px solid rgba(249, 215, 28, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: #f9d71c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ft-voice-cover-mic:hover:not(:disabled) {
    transform: scale(1.04);
    background: rgba(249, 215, 28, 0.12);
}

.ft-voice-cover-mic.is-listening {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    animation: ftVoiceCoverPulse 1.4s ease-in-out infinite;
}

.ft-voice-cover-mic:disabled,
.ft-voice-cover-mic.is-unsupported,
.ft-voice-cover-mic.is-denied {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.ft-voice-cover-mic-icon {
    width: 36px;
    height: 36px;
}

@keyframes ftVoiceCoverPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    50% { box-shadow: 0 0 0 14px rgba(40, 167, 69, 0); }
}

.ft-voice-cover-status {
    min-height: 1.3em;
    margin: 4px 0 0;
    font-size: 13px;
    color: #cbd5e1;
}

.ft-voice-cover-status.is-error {
    color: #fca5a5;
}

/* Trip pulse — Process-receipt waiting rail (extract → store → list) */
.ft-trip-pulse {
    width: 100%;
    max-width: 300px;
    margin: 2px 0 0;
    padding: 10px 12px 8px;
    border-radius: 12px;
    border: 1px solid rgba(249, 215, 28, 0.22);
    background: linear-gradient(180deg, rgba(249, 215, 28, 0.08), rgba(30, 41, 59, 0.55));
}

.ft-trip-pulse.hidden {
    display: none;
}

.ft-trip-pulse-rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.ft-trip-pulse-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 64px;
    flex: 1;
}

.ft-trip-pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ft-trip-pulse-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.ft-trip-pulse-bridge {
    flex: 0 0 18px;
    height: 2px;
    margin-bottom: 16px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.28);
}

.ft-trip-pulse-step.is-pending .ft-trip-pulse-dot {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.7);
}

.ft-trip-pulse-step.is-active .ft-trip-pulse-dot {
    border-color: #f9d71c;
    background: #f9d71c;
    animation: ftTripPulseGlow 1.35s ease-in-out infinite;
}

.ft-trip-pulse-step.is-active .ft-trip-pulse-label {
    color: #f9d71c;
}

.ft-trip-pulse-step.is-done .ft-trip-pulse-dot {
    border-color: #28a745;
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.18);
}

.ft-trip-pulse-step.is-done .ft-trip-pulse-label {
    color: #86efac;
}

.ft-trip-pulse-step.is-error .ft-trip-pulse-dot {
    border-color: #f87171;
    background: #f87171;
    animation: none;
}

.ft-trip-pulse-step.is-error .ft-trip-pulse-label {
    color: #fca5a5;
}

.ft-trip-pulse-detail {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-size: 12px;
    line-height: 1.35;
    color: #cbd5e1;
}

.ft-voice-store-cover.ft-trip-pulse-active .ft-voice-cover-status {
    /* Detail line lives on the pulse rail while processing */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.ft-voice-store-cover.ft-trip-pulse-busy .ft-voice-cover-actions {
    opacity: 0.45;
    pointer-events: none;
}

.ft-voice-store-cover.ft-trip-pulse-busy .ft-voice-cover-mic {
    opacity: 0.4;
    pointer-events: none;
    animation: none;
}

@keyframes ftTripPulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 215, 28, 0.45); }
    50% { box-shadow: 0 0 0 10px rgba(249, 215, 28, 0); }
}

.ft-voice-cover-current {
    margin: 0;
    font-size: 12px;
    color: #86efac;
}

.ft-voice-cover-current.hidden,
.ft-voice-cover-btn.hidden {
    display: none;
}

.ft-voice-cover-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 240px;
    margin-top: 8px;
}

.ft-voice-cover-btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ft-voice-cover-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ft-voice-cover-btn-primary {
    border-color: rgba(40, 167, 69, 0.55);
    background: rgba(40, 167, 69, 0.2);
    color: #bbf7d0;
}

.ft-voice-cover-btn-scan {
    border-color: rgba(249, 115, 22, 0.65);
    background: rgba(234, 88, 12, 0.92);
    color: #fff7ed;
}

.ft-voice-cover-btn-scan:hover {
    background: rgba(249, 115, 22, 0.98);
}

.ft-voice-cover-btn-scan.has-pending {
    box-shadow: 0 0 0 1px rgba(253, 186, 116, 0.55);
}

.ft-voice-cover-btn-scan.hidden {
    display: none;
}

/* Quick-scan: optional store link after upload */
.ft-receipt-store-choice-host {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 12050;
    align-items: flex-end;
    justify-content: center;
}

.ft-receipt-store-choice-host.ft-receipt-store-choice-active {
    display: flex;
}

.ft-receipt-store-choice-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.ft-receipt-store-choice-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 10px 12px;
    z-index: 1;
}

.ft-receipt-store-choice-sheet {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px 14px 10px 10px;
    padding: 14px 14px 16px;
    color: #e2e8f0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ft-receipt-store-choice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.ft-receipt-store-choice-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #fbbf24;
}

.ft-receipt-store-choice-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.ft-receipt-store-choice-msg {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.ft-receipt-store-choice-hint {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: #86efac;
}

.ft-receipt-store-choice-hint.hidden,
.ft-receipt-store-choice-btn.hidden {
    display: none;
}

.ft-receipt-store-choice-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Post-upload receipt options: 2x2 tiles with title + short help */
.ft-receipt-store-choice-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ft-receipt-store-choice-actions-grid.ft-receipt-store-choice-actions-no-default #ftReceiptStoreChoicePick {
    grid-column: 1 / -1;
}

.ft-receipt-store-choice-btn {
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.ft-receipt-store-choice-btn-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-height: 72px;
    padding: 12px 12px;
    text-align: left;
}

.ft-receipt-store-choice-btn-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
}

.ft-receipt-store-choice-btn-desc {
    display: block;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(226, 232, 240, 0.72);
}

.ft-receipt-store-choice-btn-default {
    border-color: rgba(40, 167, 69, 0.55);
    background: rgba(40, 167, 69, 0.22);
    color: #bbf7d0;
}

.ft-receipt-store-choice-btn-default .ft-receipt-store-choice-btn-desc {
    color: rgba(187, 247, 208, 0.78);
}

.ft-receipt-store-choice-btn-process {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(14, 165, 233, 0.2);
    color: #bae6fd;
}

.ft-receipt-store-choice-btn-process .ft-receipt-store-choice-btn-desc {
    color: rgba(186, 230, 253, 0.78);
}

.ft-receipt-store-choice-btn-skip {
    border-color: rgba(148, 163, 184, 0.35);
    color: #94a3b8;
}

.ft-receipt-store-choice-btn-skip .ft-receipt-store-choice-btn-desc {
    color: rgba(148, 163, 184, 0.85);
}

/* Match store sheet — clearer hierarchy (UI only; same actions) */
.ft-store-resolve-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(62vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ft-store-resolve-section-label {
    margin: 6px 0 0;
    padding: 10px 14px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.35;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.ft-store-resolve-section-label:first-child {
    margin-top: 0;
}

.ft-store-resolve-btn.ft-receipt-store-choice-btn,
.ft-store-resolve-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 10px;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.ft-store-resolve-btn-primary,
.ft-receipt-store-choice-btn-default.ft-store-resolve-btn {
    min-height: 58px;
    font-size: 15px;
    font-weight: 700;
    padding: 16px 18px;
}

.ft-store-resolve-btn-search {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.22);
    color: #bfdbfe;
}

.ft-store-resolve-btn-create {
    min-height: 54px;
}

.ft-store-resolve-btn-skip {
    min-height: 48px;
    font-weight: 600;
}

/* Keep Match store sheet inside the PWA viewport (no right clip) */
#ftStoreResolvePanel.ft-receipt-store-choice-dialog {
    max-width: min(420px, calc(100vw - 20px));
    width: 100%;
    box-sizing: border-box;
}

#ftStoreResolvePanel .ft-receipt-store-choice-sheet {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}

.ft-store-card-actions,
.ft-store-empty-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Field Tool — Shopping tab (Grocery App01 NewShoppingList parity) */
#fieldToolShoppingMount .ft-shopping {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.ft-store-card {
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ft-store-card-inner {
    padding: 12px;
}

.ft-store-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.ft-store-name-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.ft-store-emoji {
    font-size: 18px;
    line-height: 1.2;
}

.ft-store-name {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.3;
}

.ft-store-more-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #f9d71c;
    background: transparent;
    border: 1px solid rgba(249, 215, 28, 0.35);
    border-radius: 6px;
    cursor: pointer;
}

.ft-store-card-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ft-default-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
    background: #4caf50;
    color: #fff;
}

.ft-store-addr {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
}

.ft-store-empty {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ft-store-empty-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #cbd5e1;
}

.ft-tab-header {
    display: flex;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-main-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: none;
    border-bottom: 3px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ft-main-tab.active {
    background: rgba(255, 255, 255, 0.08);
    border-bottom-color: #4caf50;
    color: #f1f5f9;
}

.ft-main-tab-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ft-main-tab-sub {
    font-size: 11px;
    font-weight: 600;
}

.ft-main-tab.active .ft-main-tab-sub {
    color: #4caf50;
}

.ft-smart-banner {
    padding: 10px 12px;
    background: rgba(76, 175, 80, 0.12);
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.ft-smart-banner.hidden {
    display: none;
}

.ft-smart-banner.ft-smart-banner-prep {
    background: rgba(59, 130, 246, 0.12);
    border-bottom-color: rgba(59, 130, 246, 0.25);
}

.ft-smart-banner.ft-smart-banner-prep .ft-smart-title {
    color: #93c5fd;
}

.ft-smart-title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #86efac;
}

.ft-smart-sub {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
}

.ft-main-panel {
    display: none;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.ft-main-panel.active {
    display: flex;
}

#ftPanelRecent {
    max-height: min(52vh, calc(100vh - 340px));
    overflow-y: auto;
}

.ft-new-list-scroll {
    flex: 1;
    max-height: min(40vh, calc(100vh - 420px));
    overflow-y: auto;
}

.ft-recent-list,
.ft-np-list {
    padding: 8px 0;
}

.ft-recent-card,
.ft-np-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.ft-recent-card-added {
    opacity: 0.65;
    border-color: rgba(76, 175, 80, 0.35);
}

.ft-recent-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.ft-recent-card .ft-np-main {
    width: 100%;
}

.ft-recent-name,
.ft-np-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    flex: 1;
}

.ft-recent-add-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    background: #4caf50;
    color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 1;
    touch-action: manipulation;
}

.ft-recent-add-btn.added {
    background: #334155;
    color: #94a3b8;
    cursor: default;
}

.ft-recent-store,
.ft-recent-date,
.ft-np-store,
.ft-np-upc {
    margin: 2px 0 0;
    font-size: 11px;
    color: #94a3b8;
}

.ft-recent-meta-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #cbd5e1;
}

.ft-recent-price {
    font-weight: 700;
    color: #f9d71c;
}

.ft-add-all-wrap {
    padding: 12px 0 8px;
}

.ft-add-all-btn {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: #4caf50;
    color: #fff;
    cursor: pointer;
}

.ft-add-all-btn:hover {
    filter: brightness(1.08);
}

/* Optional left photo: only present when item has imageUrl/photo — no empty gap otherwise */
.ft-np-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ft-np-body {
    flex: 1;
    min-width: 0;
}

.ft-np-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    touch-action: manipulation;
}

.ft-np-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ft-np-thumb:hover,
.ft-np-thumb:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.55);
}

.ft-np-in-cart {
    border-color: rgba(249, 215, 28, 0.4);
    background: rgba(249, 215, 28, 0.06);
}

.ft-np-missing {
    opacity: 0.75;
    border-color: rgba(248, 113, 113, 0.35);
}

.ft-np-cart-hint {
    margin: 0 0 4px;
    font-size: 11px;
    color: #f9d71c;
    font-weight: 600;
}

.ft-np-no-stock {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #f87171;
    margin-bottom: 4px;
}

.ft-np-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.ft-qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 2px;
}

.ft-qty-btn,
.ft-qty-val {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    cursor: pointer;
    border-radius: 6px;
}

.ft-qty-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 700;
}

.ft-qty-val {
    min-width: 36px;
    padding: 4px 6px;
    font-size: 13px;
    font-weight: 700;
}

.ft-np-price-block {
    flex: 1;
    text-align: right;
    min-width: 72px;
}

.ft-np-total {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-np-unit {
    font-size: 10px;
    color: #94a3b8;
}

.ft-np-icon-actions {
    display: flex;
    gap: 4px;
}

.ft-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 14px;
    position: relative;
    flex-shrink: 0;
}

/* Grocery App01 NewShoppingList action button colors */
.ft-icon-btn-edit {
    background: #f9d71c;
    color: #1a1d21;
}

.ft-icon-btn-batch {
    background: #ff9800;
    color: #1a1d21;
}

.ft-icon-btn-batch.has-data {
    background: #9c27b0;
    color: #fff;
}

.ft-icon-btn-photo {
    background: #2196f3;
    color: #fff;
    overflow: hidden;
}

.ft-icon-btn-photo.has-photo {
    background: #4caf50;
    padding: 0;
}

.ft-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.ft-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    font-size: 12px;
    border-radius: 50%;
}

.ft-batch-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf50;
    border: 1px solid #1a1d21;
}

.ft-icon-btn.active {
    background: rgba(76, 175, 80, 0.85);
    color: #fff;
}

.ft-icon-btn.danger:hover {
    background: rgba(248, 113, 113, 0.85);
}

/* In-panel sheets: Batch + Price + Quantity + Photo + Confirm + Receipt + Purchase Date (inside #fieldToolPanel) */
.ft-batch-host,
.ft-price-host,
.ft-quantity-host,
.ft-photo-host,
.ft-confirm-host,
.ft-connection-recovery-host,
.ft-receipt-host,
.ft-purchase-date-host,
.ft-complete-host {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100050;
    align-items: flex-end;
    justify-content: center;
    padding: 0 24px 12px;
    box-sizing: border-box;
}

.ft-batch-host.ft-batch-host-active,
.ft-price-host.ft-price-host-active,
.ft-quantity-host.ft-quantity-host-active,
.ft-photo-host.ft-photo-host-active,
.ft-confirm-host.ft-confirm-host-active,
.ft-connection-recovery-host.ft-connection-recovery-host-active,
.ft-receipt-host.ft-receipt-host-active,
.ft-purchase-date-host.ft-purchase-date-host-active,
.ft-complete-host.ft-complete-host-active {
    display: flex;
    pointer-events: auto;
}

/* Centered alert (e.g. Barcode Generated) — not footer sheet */
.ft-confirm-host.ft-confirm-host--centered {
    align-items: center;
    padding: 24px;
}

.ft-confirm-host.ft-confirm-host--centered .ft-confirm-dialog {
    width: min(100%, 360px);
    max-width: 360px;
    border-radius: 14px;
}

.ft-confirm-host.ft-confirm-host--centered .ft-confirm-grab {
    display: none;
}

#fieldToolPanel .ft-batch-host,
#fieldToolPanel .ft-price-host,
#fieldToolPanel .ft-quantity-host,
#fieldToolPanel .ft-photo-host,
#fieldToolPanel .ft-confirm-host,
#fieldToolPanel .ft-connection-recovery-host,
#fieldToolPanel .ft-receipt-host,
#fieldToolPanel .ft-purchase-date-host,
#fieldToolPanel .ft-complete-host {
    position: absolute;
    inset: 0;
    z-index: 600;
}

.ft-batch-backdrop,
.ft-price-backdrop,
.ft-quantity-backdrop,
.ft-photo-backdrop,
.ft-confirm-backdrop,
.ft-connection-recovery-backdrop,
.ft-receipt-backdrop,
.ft-purchase-date-backdrop,
.ft-complete-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.ft-batch-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(78dvh, 78vh);
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-batch-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(78dvh, 78vh);
}

.ft-batch-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
    flex-shrink: 0;
}

.ft-batch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-batch-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
    flex: 1;
    padding-right: 8px;
    line-height: 1.35;
}

.ft-batch-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-batch-close:hover {
    color: #f1f5f9;
}

.ft-batch-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px 12px;
    -webkit-overflow-scrolling: touch;
}

.ft-batch-section {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin: 6px 0;
}

.ft-batch-section h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f9d71c;
}

.ft-batch-field {
    margin: 8px 0 12px;
}

.ft-batch-field label,
.ft-batch-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin: 8px 0 4px;
}

.ft-batch-section input,
.ft-batch-field input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.ft-batch-section input::placeholder,
.ft-batch-field input::placeholder {
    color: #64748b;
}

.ft-batch-hint {
    margin: 4px 0 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
}

.ft-batch-hint.italic {
    font-style: italic;
    color: #64748b;
}

.ft-batch-shift-btns {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.ft-batch-shift-btn {
    flex: 1;
    padding: 8px 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
}

.ft-batch-shift-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ft-batch-shift-btn.active {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.ft-batch-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ft-batch-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-batch-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-batch-save {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-batch-save:hover {
    filter: brightness(1.08);
}

/* Edit price modal */
.ft-price-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-price-sheet {
    display: flex;
    flex-direction: column;
}

.ft-price-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-price-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-price-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: #f1f5f9;
    line-height: 1.35;
}

.ft-price-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.ft-price-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-price-close:hover {
    color: #f1f5f9;
}

.ft-price-body {
    padding: 14px;
}

.ft-price-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}

.ft-price-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px;
    font-size: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: #f9d71c;
}

.ft-price-error {
    margin: 8px 0 0;
    font-size: 12px;
    color: #f87171;
}

.ft-price-error.hidden {
    display: none;
}

.ft-price-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-price-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-price-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-price-save {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-price-save:hover {
    filter: brightness(1.08);
}

/* Edit quantity modal (same shell as price) */
.ft-quantity-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-quantity-sheet {
    display: flex;
    flex-direction: column;
}

.ft-quantity-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-quantity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-quantity-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-quantity-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.35;
}

.ft-quantity-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.35;
}

.ft-quantity-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-quantity-close:hover {
    color: #f1f5f9;
}

.ft-quantity-body {
    padding: 14px;
}

.ft-quantity-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}

.ft-quantity-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px;
    font-size: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.ft-quantity-input::placeholder {
    color: #64748b;
}

.ft-quantity-error {
    margin: 8px 0 0;
    font-size: 12px;
    color: #f87171;
}

.ft-quantity-error.hidden {
    display: none;
}

.ft-quantity-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-quantity-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-quantity-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-quantity-save {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-quantity-save:hover {
    filter: brightness(1.08);
}

/* In-panel confirm dialog (remove item, etc.) */
.ft-confirm-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-confirm-sheet {
    display: flex;
    flex-direction: column;
}

.ft-confirm-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-confirm-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-confirm-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-confirm-close:hover {
    color: #f1f5f9;
}

.ft-confirm-body {
    padding: 16px 14px;
}

.ft-confirm-item {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.35;
}

.ft-confirm-item.hidden {
    display: none;
}

.ft-confirm-message {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
    white-space: pre-line;
}

.ft-confirm-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-confirm-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-confirm-alt {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #7c3aed;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-confirm-alt:hover {
    filter: brightness(1.08);
}

.ft-confirm-footer--three {
    flex-wrap: wrap;
}

.ft-confirm-footer--three .ft-confirm-alt {
    order: 1;
}

.ft-confirm-footer--three .ft-confirm-ok {
    order: 2;
}

.ft-confirm-footer--three .ft-confirm-cancel {
    order: 3;
    flex: 1 1 100%;
}

.ft-confirm-ok {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-confirm-ok:hover {
    filter: brightness(1.08);
}

.ft-confirm-ok.ft-confirm-danger {
    background: #dc2626;
}

.ft-confirm-ok.ft-confirm-danger:hover {
    filter: brightness(1.1);
}

/* Connection recovery dialog (network / session help) */
.ft-connection-recovery-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: min(400px, 100%);
    max-height: min(85dvh, 85vh);
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-connection-recovery-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(85dvh, 85vh);
}

.ft-connection-recovery-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
    flex-shrink: 0;
}

.ft-connection-recovery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ft-connection-recovery-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #f9d71c;
    line-height: 1.3;
}

.ft-connection-recovery-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.ft-connection-recovery-close:hover {
    color: #f1f5f9;
}

.ft-connection-recovery-body {
    padding: 12px 14px 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.ft-connection-recovery-context {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    line-height: 1.4;
}

.ft-connection-recovery-context.hidden {
    display: none;
}

.ft-connection-recovery-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #cbd5e1;
    white-space: pre-line;
}

.ft-connection-recovery-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.ft-connection-recovery-signout {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #22c55e;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-connection-recovery-signout:hover {
    filter: brightness(1.06);
}

.ft-connection-recovery-try {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-connection-recovery-try:hover {
    background: rgba(255, 255, 255, 0.06);
}

.field-tool-connection-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.field-tool-connection-status.hidden {
    display: none;
}

.field-tool-connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.25);
}

.field-tool-connection-status[data-state="checking"] .field-tool-connection-dot {
    background: #fbbf24;
    animation: ft-connection-pulse 1.2s ease-in-out infinite;
}

.field-tool-connection-status[data-state="connected"] .field-tool-connection-dot {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.field-tool-connection-status[data-state="problem"] .field-tool-connection-dot,
.field-tool-connection-status[data-state="offline"] .field-tool-connection-dot {
    background: #f87171;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
}

@keyframes ft-connection-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.92); }
}

/* Complete Shopping — Step 1: Receipt Photo */
.ft-receipt-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: min(88vh, 640px);
}

.ft-receipt-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ft-receipt-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-receipt-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-receipt-step {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.ft-receipt-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-receipt-close:hover {
    color: #f1f5f9;
}

.ft-receipt-body {
    padding: 14px;
    overflow-y: auto;
}

.ft-receipt-instruction {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-receipt-description {
    margin: 0 0 16px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
}

.ft-receipt-preview-wrap {
    text-align: center;
    margin-bottom: 16px;
}

.ft-receipt-preview-wrap.hidden {
    display: none;
}

.ft-receipt-preview-img {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 180px;
    margin: 0 auto 8px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
}

.ft-receipt-preview-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #4caf50;
}

.ft-receipt-placeholder {
    text-align: center;
    padding: 32px 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.ft-receipt-placeholder.hidden {
    display: none;
}

.ft-receipt-placeholder-icon {
    display: block;
    font-size: 40px;
    margin-bottom: 8px;
}

.ft-receipt-placeholder-text {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

.ft-receipt-actions-row {
    display: flex;
    gap: 8px;
}

.ft-receipt-camera-btn,
.ft-receipt-gallery-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.ft-receipt-camera-btn {
    background: #2196f3;
}

.ft-receipt-gallery-btn {
    background: #ff9800;
}

.ft-receipt-link-pending-btn {
    width: 100%;
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(14, 165, 233, 0.18);
    color: #bae6fd;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ft-receipt-link-pending-btn.hidden {
    display: none;
}

.ft-receipt-link-pending-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ft-receipt-pending-panel {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.65);
}

.ft-receipt-pending-panel.hidden {
    display: none;
}

.ft-receipt-pending-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ft-receipt-pending-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
}

.ft-receipt-pending-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.ft-receipt-pending-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    padding: 9px 10px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 12px;
    cursor: pointer;
}

.ft-receipt-pending-when {
    font-size: 11px;
    color: #94a3b8;
}

.ft-receipt-pending-store {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
}

.ft-receipt-pending-addr {
    font-size: 11px;
    color: #86efac;
    line-height: 1.35;
}

.ft-receipt-pending-item:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}

.ft-receipt-pending-item.is-selected {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.65);
    color: #e0f2fe;
}

/* Stacked Display / Delete — tall tap targets for older users in a narrow column */
.ft-receipt-pending-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 76px;
}

.ft-receipt-pending-view,
.ft-receipt-pending-delete {
    flex: 1 1 auto;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}

.ft-receipt-pending-view {
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
}

.ft-receipt-pending-view:hover {
    background: rgba(245, 158, 11, 0.28);
}

.ft-receipt-pending-delete {
    border: 1px solid rgba(248, 113, 113, 0.55);
    background: rgba(220, 38, 38, 0.22);
    color: #fecaca;
}

.ft-receipt-pending-delete:hover {
    background: rgba(220, 38, 38, 0.34);
}

.ft-receipt-pending-empty {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.ft-receipt-camera-btn:hover,
.ft-receipt-gallery-btn:hover {
    filter: brightness(1.08);
}

.ft-receipt-camera-btn:disabled,
.ft-receipt-gallery-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ft-receipt-error {
    margin: 10px 0 0;
    font-size: 12px;
    color: #f87171;
}

.ft-receipt-error.hidden {
    display: none;
}

.ft-receipt-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-receipt-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-receipt-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-receipt-next {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-receipt-next:hover:not(:disabled) {
    filter: brightness(1.08);
}

.ft-receipt-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ft-receipt-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Complete Shopping — Step 2: Purchase Date & Time */
.ft-purchase-date-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: min(88vh, 680px);
}

.ft-purchase-date-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ft-purchase-date-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-purchase-date-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-purchase-date-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-purchase-date-step {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.ft-purchase-date-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-purchase-date-close:hover {
    color: #f1f5f9;
}

.ft-purchase-date-body {
    padding: 14px;
    overflow-y: auto;
}

.ft-purchase-date-instruction {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-purchase-date-description {
    margin: 0 0 16px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
}

.ft-purchase-receipt-wrap {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ft-purchase-receipt-wrap.hidden {
    display: none;
}

.ft-purchase-receipt-label {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

.ft-purchase-receipt-img {
    display: block;
    width: 100%;
    max-width: 160px;
    max-height: 100px;
    margin: 0 auto 6px;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
}

.ft-purchase-receipt-caption {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #4caf50;
}

.ft-purchase-field {
    margin-bottom: 16px;
    position: relative;
}

.ft-purchase-field-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

.ft-purchase-picker-shell {
    position: relative;
    min-height: 72px;
}

.ft-purchase-picker-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
}

.ft-purchase-picker-value {
    font-size: 20px;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.ft-purchase-picker-hint {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* Transparent native input covers the face so mobile taps open the OS picker */
.ft-purchase-native-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    opacity: 0.001;
    cursor: pointer;
    z-index: 2;
    font-size: 16px;
    color-scheme: dark;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.ft-time-picker-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: inherit;
}

.ft-time-picker-trigger .ft-purchase-picker-face {
    pointer-events: none;
}

.ft-time-picker-panel {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.ft-time-picker-panel.hidden {
    display: none;
}

.ft-time-picker-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-time-picker-cancel,
.ft-time-picker-done {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

.ft-time-picker-cancel {
    color: #94a3b8;
}

.ft-time-picker-done {
    color: #4caf50;
}

.ft-time-picker-columns {
    position: relative;
    display: flex;
    height: 220px;
    align-items: stretch;
}

.ft-time-picker-highlight {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 88px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 0;
}

.ft-time-picker-col {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.ft-time-picker-scroll {
    height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 88px;
    scroll-padding-bottom: 88px;
    scrollbar-width: none;
}

.ft-time-picker-scroll::-webkit-scrollbar {
    display: none;
}

.ft-time-picker-content {
    padding: 88px 0; /* (220 - 44) / 2 — same as Grocery App01 timePickerContent */
}

.ft-time-picker-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    font-size: 20px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.ft-time-picker-item.selected {
    color: #f9d71c;
    font-weight: 800;
}

.ft-purchase-date-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-purchase-date-cancel {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-purchase-date-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-purchase-date-next {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-purchase-date-next:hover {
    filter: brightness(1.08);
}

/* Complete Shopping — Step 3 */
.ft-complete-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: min(90vh, 720px);
}

.ft-complete-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ft-complete-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-complete-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-complete-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-complete-step {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.ft-complete-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

.ft-complete-body {
    padding: 14px;
    overflow-y: auto;
    font-size: 13px;
}

.ft-complete-section {
    margin-bottom: 16px;
}

.ft-complete-section.hidden {
    display: none;
}

.ft-complete-section h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
}

.ft-complete-receipt {
    text-align: center;
}

.ft-complete-receipt-img {
    display: block;
    width: 100%;
    max-width: 180px;
    max-height: 120px;
    margin: 8px auto;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
}

.ft-complete-receipt-caption {
    margin: 0;
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
}

.ft-complete-store-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-complete-store-muted {
    margin: 4px 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.ft-complete-summary-line {
    margin: 0 0 6px;
    color: #e2e8f0;
    line-height: 1.4;
}

.ft-complete-summary-warn {
    margin: 0 0 8px;
    font-size: 12px;
    color: #f87171;
    line-height: 1.4;
}

/* DP0 — trip gate hint above confirm */
.ft-complete-gate-hint {
    margin: 0 0 10px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: #f59e0b;
    line-height: 1.4;
}

.ft-complete-subtotal {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-complete-tax-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    color: #94a3b8;
}

.ft-complete-tax-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #1e293b;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.ft-complete-tax-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.ft-complete-total {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #4caf50;
}

.ft-complete-progress-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.ft-complete-progress-fill {
    height: 100%;
    width: 0;
    background: #4caf50;
    transition: width 0.2s ease;
}

.ft-complete-progress-text {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

.ft-complete-footer {
    display: flex;
    gap: 6px;
    padding: 10px 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-complete-btn-cancel,
.ft-complete-btn-store,
.ft-complete-btn-confirm {
    flex: 1;
    min-width: 0;
    padding: 11px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.ft-complete-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.ft-complete-btn-store {
    background: rgba(33, 150, 243, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(33, 150, 243, 0.35);
}

.ft-complete-btn-confirm {
    background: #4caf50;
    color: #fff;
}

.ft-complete-btn-confirm:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Item photo options modal */
.ft-photo-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-photo-sheet {
    display: flex;
    flex-direction: column;
}

.ft-photo-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-photo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-photo-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-photo-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.35;
}

.ft-photo-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.ft-photo-upload-status {
    margin: 0;
    padding: 8px 14px;
    font-size: 12px;
    color: #f9d71c;
    background: rgba(249, 215, 28, 0.08);
}

.ft-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
}

.ft-photo-action {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.ft-photo-action:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.ft-photo-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ft-photo-action-danger {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.35);
}

.ft-photo-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-photo-cancel {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-photo-result-body {
    padding: 20px 14px 14px;
    text-align: center;
}

.ft-photo-result-body.hidden {
    display: none;
}

.ft-photo-options-body.hidden {
    display: none;
}

.ft-photo-result-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.ft-photo-result-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 2px solid #4caf50;
}

.ft-photo-result-error {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 2px solid rgba(248, 113, 113, 0.5);
}

.ft-photo-result-info {
    background: rgba(33, 150, 243, 0.15);
    color: #60a5fa;
    border: 2px solid rgba(33, 150, 243, 0.4);
}

.ft-photo-result-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    color: #f1f5f9;
}

.ft-photo-result-item {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #f9d71c;
    line-height: 1.35;
}

.ft-photo-result-message {
    margin: 0 0 16px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
}

.ft-photo-result-footer {
    display: flex;
    gap: 8px;
}

.ft-photo-done {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ft-photo-done:hover {
    filter: brightness(1.08);
}

.ft-photo-retry {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-photo-retry:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-photo-retry.hidden {
    display: none;
}

.ft-photo-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.ft-photo-viewer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100060;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.ft-photo-viewer.ft-photo-viewer-active {
    display: flex;
}

#fieldToolPanel .ft-photo-viewer {
    position: absolute;
    z-index: 600;
}

.ft-photo-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.ft-photo-viewer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 22px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.ft-photo-viewer-image {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.ft-photo-viewer-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 2;
    margin: 0;
    text-align: center;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 380px) {
    .ft-batch-host,
    #fieldToolPanel .ft-batch-host,
    .ft-price-host,
    #fieldToolPanel .ft-price-host,
    .ft-quantity-host,
    #fieldToolPanel .ft-quantity-host,
    .ft-photo-host,
    #fieldToolPanel .ft-photo-host {
        padding: 0 16px 10px;
    }
}

.ft-summary {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-summary.hidden,
.ft-new-actions.hidden,
.hidden {
    display: none !important;
}

.ft-summary-total {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #4caf50;
}

.ft-summary-count {
    margin: 4px 0 0;
    font-size: 11px;
    color: #94a3b8;
}

.ft-new-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
}

.ft-btn-secondary,
.ft-btn-primary {
    flex: 1;
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.ft-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.ft-btn-primary {
    background: #4caf50;
    color: #fff;
}

.ft-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ft-search-products-bar {
    padding: 8px 0 4px;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.ft-search-products-bar.hidden {
    display: none;
}

.ft-btn-search-products {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    background: #f9d71c;
    color: #1a1d21;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(249, 215, 28, 0.25);
}

.ft-btn-search-products:hover {
    filter: brightness(1.03);
}

.ft-btn-search-products-voice {
    flex-shrink: 0;
    width: 52px;
    border: 1px solid rgba(249, 215, 28, 0.45);
    border-radius: 10px;
    background: rgba(249, 215, 28, 0.12);
    color: #f9d71c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-btn-search-products-voice:hover:not(:disabled) {
    background: rgba(249, 215, 28, 0.2);
}

.ft-btn-search-products-voice:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ft-btn-search-products-voice svg {
    width: 22px;
    height: 22px;
}

/* Product search modal — inside #fieldToolPanel */
.ft-search-host {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100050;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px 8px;
    box-sizing: border-box;
}

.ft-search-host.ft-search-host-active {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

#fieldToolPanel .ft-search-host {
    position: absolute;
    inset: 0;
    z-index: 500;
    padding: 0 12px 8px;
}

.ft-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.ft-search-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    max-height: min(88dvh, 88vh);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-search-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(88dvh, 88vh);
}

.ft-search-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-search-header {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-search-header h2 {
    margin: 0;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-search-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.ft-search-barcode-btn {
    border: none;
    background: #f9d71c;
    color: #1a1d21;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(249, 215, 28, 0.35);
}

.ft-search-toolbar {
    position: relative;
    padding: 12px;
}

.ft-search-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ft-search-input {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 36px 12px 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.ft-search-input::placeholder {
    color: #64748b;
}

.ft-search-clear {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 1;
}

.ft-search-clear.hidden {
    display: none;
}

.ft-search-voice-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(249, 215, 28, 0.4);
    background: rgba(249, 215, 28, 0.1);
    color: #f9d71c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ft-search-voice-btn:hover:not(:disabled) {
    background: rgba(249, 215, 28, 0.18);
}

.ft-search-voice-btn.is-listening {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    animation: ftVoiceCoverPulse 1.4s ease-in-out infinite;
}

.ft-search-voice-btn:disabled,
.ft-search-voice-btn.is-unsupported,
.ft-search-voice-btn.is-denied {
    opacity: 0.45;
    cursor: not-allowed;
    animation: none;
}

.ft-search-voice-icon {
    width: 20px;
    height: 20px;
}

.ft-search-status {
    margin: 0 12px 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #f9d71c;
    background: rgba(249, 215, 28, 0.08);
}

.ft-search-status.error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.ft-search-status.hidden {
    display: none;
}

.ft-search-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 12px;
}

.ft-search-empty {
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
}

.ft-search-empty-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

.ft-search-empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}

.ft-search-empty-sub {
    margin-top: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
}

.ft-search-miss-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
    max-width: 280px;
}

.ft-np-pending-badge {
    display: inline-block;
    margin: 0 0 6px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

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

.ft-search-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ft-search-item-media {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-search-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ft-search-item-placeholder {
    font-size: 22px;
}

.ft-search-item-name {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.3;
}

.ft-search-item-meta,
.ft-search-item-upc,
.ft-search-item-history,
.ft-search-item-count {
    margin: 0 0 2px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
}

.ft-search-item-history.muted {
    color: #64748b;
}

/* DPQ-1 — avg / range line under last-paid history */
.ft-search-item-range {
    margin: 0 0 2px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
}

/* DPQ-2 — price-radar verdict vs personal average */
.ft-price-verdict {
    margin: 2px 0 0;
    font-size: 11px;
    font-weight: 700;
}

.ft-price-verdict-good {
    color: #16a34a;
}

.ft-price-verdict-warn {
    color: #d97706;
}

.ft-search-item-price {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 800;
    color: #4caf50;
}

.ft-search-add-btn {
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.ft-search-add-btn:hover {
    filter: brightness(1.08);
}

/* Barcode scanner — inside #fieldToolPanel (SearchBarcodeScanner parity) */
.ft-barcode-host {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100060;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.ft-barcode-host.ft-barcode-host-active {
    display: flex;
    pointer-events: auto;
}

#fieldToolPanel .ft-barcode-host {
    position: absolute;
    inset: 0;
    z-index: 520;
}

.ft-barcode-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.ft-barcode-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-width: 420px;
    max-height: min(85dvh, 85vh);
    border-radius: 14px;
    background: #0f1114;
    color: #f1f5f9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.ft-barcode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #0f1114;
}

.ft-barcode-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-barcode-close {
    border: none;
    background: transparent;
    color: #f1f5f9;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

.ft-barcode-camera-wrap {
    position: relative;
    flex: 1 1 auto;
    height: min(52vh, 360px);
    min-height: 240px;
    max-height: 360px;
    background: #000;
}

.ft-barcode-reader {
    width: 100%;
    height: 100%;
    min-height: 240px;
}

.ft-barcode-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    min-height: 240px;
}

/* Hide html5-qrcode built-in controls — we use our own overlay */
#ftBarcodeReader button,
#ftBarcodeReader select,
#ftBarcodeReader a,
#ftBarcodeReader img[alt="Info icon"] {
    display: none !important;
}

#ftBarcodeReader {
    border: none !important;
}

/* Hide library qrbox white corners — we draw our own nested guide */
#ftBarcodeReader #qr-shaded-region {
    border: none !important;
    box-shadow: none !important;
}

#ftBarcodeReader #qr-shaded-region > div {
    display: none !important;
}

.ft-barcode-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Outer white + inner yellow, both centered in the same box */
.ft-barcode-frame-outer {
    width: min(72%, 260px);
    height: min(42%, 156px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-barcode-frame-inner {
    width: 78%;
    height: 78%;
    position: relative;
}

.ft-barcode-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-style: solid;
    border-width: 3px;
    box-sizing: border-box;
}

.ft-barcode-corner-white {
    border-color: #ffffff;
}

.ft-barcode-corner-yellow {
    border-color: #f9d71c;
    width: 18px;
    height: 18px;
    border-width: 2.5px;
}

.ft-barcode-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.ft-barcode-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.ft-barcode-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.ft-barcode-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.ft-barcode-hint {
    margin: 28px 0 0;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
}

.ft-barcode-no-camera {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #cbd5e1;
    font-size: 14px;
    gap: 8px;
}

.ft-barcode-no-camera.hidden {
    display: none;
}

.ft-barcode-controls {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: #0f1114;
}

.ft-barcode-ctrl {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ft-barcode-ctrl-gold {
    background: #f9d71c;
    color: #1a1d21;
}

.ft-barcode-manual {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1d21;
}

.ft-barcode-manual.hidden {
    display: none;
}

.ft-barcode-manual label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.ft-barcode-manual input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font-size: 16px;
    text-align: center;
    margin-bottom: 10px;
}

.ft-barcode-manual-actions {
    display: flex;
    gap: 8px;
}

.ft-empty-state {
    padding: 24px 12px;
    text-align: center;
}

.ft-empty-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
}

.ft-empty-msg {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.ft-switch-tab-btn {
    margin-top: 16px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #2196f3;
    color: #fff;
    cursor: pointer;
}

.ft-loading {
    padding: 32px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.ft-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(249, 215, 28, 0.3);
    border-top-color: #f9d71c;
    border-radius: 50%;
    animation: ft-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

.ft-shopping-status {
    font-size: 11px;
    color: #94a3b8;
    margin: 8px 0 0;
    padding: 0 2px;
}

.ft-shopping-status.error {
    color: #f87171;
}

/* Complete Shopping modal */
.ft-modal {
    border: none;
    padding: 0;
    max-width: calc(100% - 32px);
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ft-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.ft-modal-inner {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.ft-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.ft-modal-step {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.ft-modal-receipt {
    text-align: center;
}

.ft-modal-receipt.hidden {
    display: none;
}

.ft-modal-receipt-img {
    display: block;
    width: 100%;
    max-width: 180px;
    max-height: 120px;
    margin: 8px auto;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
}

.ft-modal-receipt-caption {
    margin: 0;
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
}

.ft-modal-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

.ft-modal-body {
    padding: 16px;
    overflow-y: auto;
    font-size: 13px;
}

.ft-modal-body section {
    margin-bottom: 16px;
}

.ft-modal-body h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
}

.ft-modal-muted {
    color: #94a3b8;
    font-size: 12px;
    margin: 4px 0;
}

.ft-modal-tax-input {
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #1e293b;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

.ft-modal-total {
    font-size: 20px;
    font-weight: 800;
    color: #4caf50;
    margin: 0;
}

.ft-modal-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stores modal — inside #fieldToolPanel (same PWA shell as Batch) */
.ft-stores-host {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100050;
    align-items: flex-end;
    justify-content: center;
    padding: 0 24px 12px;
    box-sizing: border-box;
}

.ft-stores-host.ft-stores-host-active {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

#fieldToolPanel .ft-stores-host {
    position: absolute;
    inset: 0;
    z-index: 500;
}

.ft-stores-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.ft-stores-panel-hidden {
    display: none !important;
}

.ft-stores-dialog {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(78dvh, 78vh);
    border-radius: 12px;
    background: #2d3238;
    color: #f1f5f9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ft-stores-form-dialog {
    z-index: 2;
}

.ft-stores-sheet {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(78dvh, 78vh);
    position: relative;
}

.ft-stores-grab {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    margin: 8px auto 4px;
}

.ft-stores-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 14px 10px;
}

.ft-stores-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #f9d71c;
}

.ft-stores-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.ft-stores-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

.ft-stores-close:hover {
    color: #f1f5f9;
}

.ft-stores-toolbar {
    padding: 0 14px 8px;
}

.ft-stores-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
}

.ft-stores-search-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: #f1f5f9;
}

.ft-stores-search-wrap input::placeholder {
    color: #64748b;
}

.ft-stores-add-btn {
    width: 100%;
    border: 1px solid rgba(249, 215, 28, 0.45);
    background: rgba(249, 215, 28, 0.08);
    color: #f9d71c;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

.ft-stores-add-btn:hover {
    background: rgba(249, 215, 28, 0.14);
}

.ft-stores-section-label {
    margin: 6px 14px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f9d71c;
}

.ft-stores-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 14px 8px;
    -webkit-overflow-scrolling: touch;
}

.ft-stores-card {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.ft-stores-card-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.ft-stores-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(249, 215, 28, 0.15);
    color: #f9d71c;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ft-stores-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ft-stores-card-title {
    font-weight: 700;
    font-size: 14px;
    color: #f1f5f9;
}

.ft-stores-default-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    background: #4caf50;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.ft-stores-card-addr {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
}

.ft-stores-card-type {
    font-size: 11px;
    color: #64748b;
}

.ft-stores-card-indicator {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: #94a3b8;
}

.ft-stores-card-main .ft-stores-card-indicator {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.ft-stores-card .ft-stores-card-indicator.is-selected,
.ft-stores-card-selected .ft-stores-card-indicator {
    background: #4caf50;
    color: #fff;
}

.ft-stores-menu-btn {
    width: 40px;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

.ft-stores-menu-btn:hover {
    color: #f9d71c;
    background: rgba(249, 215, 28, 0.06);
}

.ft-stores-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ft-stores-cancel {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ft-stores-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.ft-stores-loading,
.ft-stores-empty {
    text-align: center;
    color: #94a3b8;
    padding: 20px 8px;
    font-size: 13px;
}

.ft-stores-action-menu {
    position: fixed;
    z-index: 100060;
    background: #2d3238;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    min-width: 180px;
    overflow: hidden;
}

.ft-stores-action-menu.hidden {
    display: none;
}

.ft-stores-action-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: none;
    background: #2d3238;
    color: #f1f5f9;
    font-size: 14px;
    cursor: pointer;
}

.ft-stores-action-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ft-stores-action-menu .ft-stores-menu-cancel {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.ft-stores-form {
    padding: 0 14px 14px;
    overflow-y: auto;
    max-height: 60vh;
    -webkit-overflow-scrolling: touch;
}

.ft-store-form-mode-edit .ft-store-form-add-only {
    display: none;
}

.ft-store-form-mode-add .ft-store-form-edit-only {
    display: none;
}

.ft-stores-form-note {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 8px;
}

.ft-naics-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.ft-naics-search-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
    margin-top: 4px;
}

.ft-naics-search-row input[type="search"] {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 42px;
    margin-top: 0;
    padding: 0 10px;
    font-size: 14px;
    line-height: 1.2;
    box-sizing: border-box;
}

.ft-naics-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
}

.ft-naics-status,
.ft-naics-hint {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
}

.ft-naics-status.is-error {
    color: #f87171;
}

.naics-search-results {
    max-height: 220px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
}

.naics-search-results.hidden {
    display: none !important;
}

.naics-search-empty {
    margin: 0;
    padding: 10px;
    font-size: 12px;
    color: #94a3b8;
}

.naics-search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.naics-search-table th,
.naics-search-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.naics-search-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    font-weight: 700;
    color: #334155;
    z-index: 1;
}

.naics-search-table tbody tr {
    cursor: pointer;
}

.naics-search-table tbody tr:hover,
.naics-search-table tbody tr:focus {
    background: #e0f2fe;
    outline: none;
}

.naics-search-table-dark {
    color: #e2e8f0;
}

.naics-search-table-dark thead th {
    background: #1e293b;
    color: #f9d71c;
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.naics-search-table-dark th,
.naics-search-table-dark td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.naics-search-table-dark tbody tr:hover,
.naics-search-table-dark tbody tr:focus {
    background: rgba(249, 215, 28, 0.12);
}

/* Light web modals: results sit on white */
#addStoreLocationModal .naics-search-results,
#editStoreLocationModal .naics-search-results {
    background: #fff;
    border-color: #dee2e6;
}

.naics-search-status.is-error {
    color: #dc3545;
}
    color: #94a3b8;
    margin: -4px 0 12px;
    line-height: 1.4;
}

.ft-stores-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 12px;
}

.ft-stores-form input,
.ft-stores-form select {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.ft-stores-form select {
    color-scheme: dark;
    cursor: pointer;
}

.ft-stores-form select option,
.ft-stores-form select optgroup {
    background-color: #2d3238;
    color: #f1f5f9;
}

.ft-stores-form select option:checked {
    background-color: #3d4450;
    color: #f9d71c;
}

.ft-stores-form select:focus {
    outline: none;
    border-color: rgba(249, 215, 28, 0.45);
    box-shadow: 0 0 0 2px rgba(249, 215, 28, 0.15);
}

.ft-stores-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ft-stores-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    color: #cbd5e1 !important;
}

.ft-stores-checkbox input {
    width: auto;
    margin: 0;
}

.ft-stores-form-error {
    color: #f87171;
    font-size: 13px;
    margin: 0 0 8px;
}

.ft-stores-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ft-stores-form-actions .ft-stores-cancel {
    flex: 1;
}

.ft-stores-save {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.ft-stores-save:hover {
    filter: brightness(1.08);
}

#fieldToolPanel .field-tool-intro-card {
    display: none;
}

#field-tool-shopping-content .field-tool-auth-hint {
    margin-bottom: 8px;
}

.field-tool-panel-header {
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}

.field-tool-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.field-tool-sign-in-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.field-tool-sign-in-btn:hover {
    background: rgba(249, 215, 28, 0.15);
    color: #f9d71c;
}

.field-tool-sign-in-btn svg {
    flex-shrink: 0;
}

.field-tool-signed-in-label {
    min-width: 28px;
    max-width: 48px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #4ade80;
    text-align: center;
    cursor: default;
}

.beacon-floating-btn {
    width: 64px;
    height: 64px;
    background: #212529;
    color: #f9d71c;
    border: 1px solid rgba(249, 215, 28, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse-gold 3s infinite;
}

.beacon-floating-btn:hover {
    background: #2a2e32;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(249, 215, 28, 0.4);
}

.beacon-floating-btn i {
    font-size: 24px;
}

/* Intelligence Beacon chip FAB hidden for now — basket (Field Tool) only. Panel + JS kept for reuse. */
#beaconFloatingBtn {
    display: none !important;
}

/* Side Panel */
.intelligence-beacon-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    max-width: 450px;
    background-color: #212529;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}

.intelligence-beacon-panel.open {
    transform: translateX(0);
    /* Above floating basket/chip buttons (9999) so + Add and list taps hit the drawer */
    z-index: 10001;
}

/* While Field Tool is open, FABs sit behind the drawer — avoids accidental toggle on + Add */
body:has(#fieldToolPanel.open).field-tool-panel-open .beacon-floating-btn-container {
    pointer-events: none;
    opacity: 0.4;
}

/* Lock background scroll only while Field Tool basket drawer is open */
body:has(#fieldToolPanel.open).field-tool-panel-open {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Auth modals must stack above Field Tool drawer (10001) and in-panel sheets (100060) */
#signInModal,
#createAccountModal,
#forgotPasswordModal {
    z-index: 100100;
}

/* Panel Header */
.beacon-panel-header {
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.beacon-panel-title {
    flex: 1;
}

.beacon-panel-subtitle {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #f9d71c;
    margin: 0 0 6px 0;
}

.beacon-panel-main-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f9d71c;
    margin: 0;
    line-height: 1.4;
}

.beacon-panel-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.beacon-panel-close:hover {
    color: white;
}

/* Tab Navigation */
.beacon-tab-navigation {
    display: flex;
    gap: 8px;
    padding: 4px;
    margin: 0 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.beacon-tab-btn {
    flex: 1;
    padding: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.beacon-tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.beacon-tab-btn:hover {
    color: white;
}

/* Panel Content */
.beacon-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.beacon-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

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

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

/* Blueprint Card */
.beacon-blueprint-card {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #1e293b 100%);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.beacon-blueprint-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.beacon-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    line-height: 1.6;
    margin: 0;
}

.beacon-card-icon {
    position: absolute;
    right: -16px;
    bottom: -16px;
    font-size: 80px;
    opacity: 0.1;
    color: white;
}

/* Section */
.beacon-section {
    margin-bottom: 32px;
}

.beacon-section-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* Metrics Grid */
.beacon-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.beacon-metric-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.beacon-metric-content {
    flex: 1;
}

.beacon-metric-value {
    font-size: 24px;
    font-weight: 800;
    color: #f9d71c;
    margin: 0 0 4px 0;
}

.beacon-metric-value.success {
    color: #28a745;
}

.beacon-metric-label {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    margin: 0;
}

.beacon-metric-icon {
    font-size: 24px;
    color: rgba(148, 163, 184, 0.4);
}

/* Hall of Heroes */
.beacon-hall-card {
    padding: 24px;
    background: #1e293b;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.beacon-hall-title {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.beacon-hall-title i {
    color: #f9d71c;
}

.beacon-hall-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.beacon-hall-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.beacon-hall-name {
    font-size: 12px;
    font-weight: 500;
    color: #cbd5e1;
}

.beacon-hall-badge {
    font-size: 9px;
    font-weight: 800;
    color: #f9d71c;
    background: rgba(249, 215, 28, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.beacon-hall-badge.success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

/* Signal Tab */
.beacon-signal-header-with-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.beacon-signal-header-with-btn h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.beacon-email-icon-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.beacon-email-icon-btn:hover {
    color: #f9d71c;
}

.beacon-signal-description {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 32px 0;
}

/* Gap Pulse Animation */
@keyframes pulse-gap {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249, 215, 28, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(249, 215, 28, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249, 215, 28, 0); }
}

.beacon-gap-pulse {
    width: 8px;
    height: 8px;
    background: #f9d71c;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse-gap 2s infinite;
}

/* Live Gap Radar Section */
.beacon-gap-radar-section {
    margin-bottom: 32px;
}

.beacon-gap-radar-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f9d71c;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
}

/* Gap Items */
.beacon-gap-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.beacon-gap-item:hover {
    border-color: rgba(249, 215, 28, 0.5);
}

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

.beacon-gap-name {
    font-size: 12px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.beacon-gap-item:hover .beacon-gap-name {
    color: #f9d71c;
}

.beacon-gap-details {
    font-size: 10px;
    color: #64748b;
    margin: 0;
}

.beacon-me-too-btn {
    background: #f9d71c;
    color: #212529;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 215, 28, 0.1);
}

.beacon-me-too-btn:hover {
    background: #fbbf24;
    box-shadow: 0 6px 20px rgba(249, 215, 28, 0.2);
}

/* Report Different Item Button */
.beacon-report-item-btn {
    width: 100%;
    padding: 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.beacon-report-item-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(30, 41, 59, 0.7);
}

/* Urgent Support Section */
.beacon-urgent-support {
    margin-top: 32px;
}

.beacon-urgent-card {
    padding: 16px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.beacon-urgent-card:hover {
    background: rgba(220, 38, 38, 0.1);
}

.beacon-urgent-content {
    flex: 1;
}

.beacon-urgent-title {
    font-size: 12px;
    font-weight: 700;
    color: #ef4444;
    display: block;
    margin-bottom: 4px;
}

.beacon-urgent-description {
    font-size: 10px;
    color: #64748b;
    margin: 0;
}

.beacon-urgent-icon {
    font-size: 20px;
    color: #ef4444;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.beacon-urgent-card:hover .beacon-urgent-icon {
    opacity: 1;
}

/* Email Form Container */
.beacon-email-form-container {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.beacon-email-form-container.active {
    display: block;
}

.beacon-signal-options.hidden {
    display: none;
}

.beacon-email-form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.beacon-email-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.beacon-email-back-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.beacon-email-form-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
}

.beacon-email-form-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.beacon-email-input,
.beacon-email-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: white;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.beacon-email-input:focus,
.beacon-email-textarea:focus {
    border-color: rgba(249, 215, 28, 0.5);
}

.beacon-email-input::placeholder,
.beacon-email-textarea::placeholder {
    color: #94a3b8;
}

.beacon-email-textarea {
    min-height: 160px;
    resize: vertical;
}

.beacon-send-signal-btn {
    width: 100%;
    padding: 16px;
    background: white;
    color: #212529;
    border-radius: 16px;
    border: none;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.beacon-send-signal-btn:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Help Tab */
.beacon-help-section {
    margin-bottom: 32px;
}

.beacon-faq-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.beacon-faq-question {
    font-size: 12px;
    font-weight: 700;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.beacon-faq-question::-webkit-details-marker {
    display: none;
}

.beacon-faq-question i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.beacon-faq-item[open] .beacon-faq-question i {
    transform: rotate(180deg);
}

.beacon-faq-answer {
    margin-top: 12px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.6;
    font-style: italic;
}

/* Panel Footer */
.beacon-panel-footer {
    padding: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.beacon-panel-footer p {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    margin: 0;
}

/* Field Tool on laptop/desktop: slide in from the left (phone keeps right-side drawer) */
@media (min-width: 769px) {
    #fieldToolPanel.intelligence-beacon-panel {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        border-left: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    #fieldToolPanel.intelligence-beacon-panel.open {
        transform: translateX(0);
    }
}

/* PWA sheets: same horizontal inset as shopping cards */
@media (max-width: 768px) {
    .ft-stores-host,
    #fieldToolPanel .ft-stores-host,
    .ft-batch-host,
    #fieldToolPanel .ft-batch-host,
    .ft-price-host,
    #fieldToolPanel .ft-price-host,
    .ft-quantity-host,
    #fieldToolPanel .ft-quantity-host,
    .ft-photo-host,
    #fieldToolPanel .ft-photo-host {
        padding: 0 24px 12px;
    }
}

/* Responsive — phone: full-width drawer from the right */
@media (max-width: 768px) {
    .intelligence-beacon-panel {
        max-width: 100%;
    }

    #fieldToolPanel.intelligence-beacon-panel {
        right: 0;
        left: auto;
        transform: translateX(100%);
        border-right: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    }

    #fieldToolPanel.intelligence-beacon-panel.open {
        transform: translateX(0);
    }
    
    body:has(#fieldToolPanel) .beacon-floating-btn-container {
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    
    .beacon-floating-btn {
        width: 56px;
        height: 56px;
    }
}

/* ========== Field Tool — More / My Tools (Grocery App01 MoreScreen) ========== */
#fieldToolPanel .ft-more-hub {
    padding: 8px 4px 24px;
    color: #e2e8f0;
}

#fieldToolPanel .ft-more-title {
    margin: 0 0 20px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #f8fafc;
}

#fieldToolPanel .ft-more-section {
    margin-bottom: 22px;
}

#fieldToolPanel .ft-more-section-header {
    margin: 0 0 12px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

#fieldToolPanel .ft-more-section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

#fieldToolPanel .ft-more-section-header-row .ft-more-section-header {
    margin: 0 0 0 4px;
}

#fieldToolPanel .ft-more-coming-soon {
    background: #334155;
    color: #cbd5e1;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 999px;
}

#fieldToolPanel .ft-more-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

#fieldToolPanel .ft-more-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 118px;
    padding: 12px 8px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #1e293b;
    color: inherit;
    cursor: pointer;
    text-align: center;
}

#fieldToolPanel .ft-more-card-add { border-color: #1e3a8a; }
#fieldToolPanel .ft-more-card-modify { border-color: #581c87; }
#fieldToolPanel .ft-more-card-display { border-color: #065f46; }

#fieldToolPanel .ft-more-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    font-size: 1rem;
}

#fieldToolPanel .ft-more-card-icon-add { background: #1e3a8a; color: #93c5fd; }
#fieldToolPanel .ft-more-card-icon-modify { background: #581c87; color: #d8b4fe; }
#fieldToolPanel .ft-more-card-icon-display { background: #064e3b; color: #6ee7b7; }

#fieldToolPanel .ft-more-card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1f5f9;
}

#fieldToolPanel .ft-more-card-sub {
    font-size: 0.65rem;
    color: #94a3b8;
}

#fieldToolPanel .ft-more-list-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #1e293b;
    color: inherit;
    text-align: left;
}

#fieldToolPanel .ft-more-list-item.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#fieldToolPanel .ft-more-list-icon {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: #0f172a;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#fieldToolPanel .ft-more-list-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#fieldToolPanel .ft-more-list-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
}

#fieldToolPanel .ft-more-list-sub {
    font-size: 0.75rem;
    color: #94a3b8;
}

.ft-more-modal-host {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 80;
}

.ft-more-modal-host.is-open {
    display: block;
}

#fieldToolPanel .ft-more-modal-host,
body > .ft-more-modal-host {
    position: fixed;
}

.ft-more-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
}

.ft-more-modal-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 8%;
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border-radius: 16px 16px 0 0;
    border: 1px solid #334155;
    color: #e2e8f0;
    overflow: hidden;
}

.ft-more-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #1e293b;
}

.ft-more-modal-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.05rem;
    color: #f9d71c;
}

.ft-more-save-toast {
    display: none;
    margin: 0;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: #052e16;
    background: #86efac;
    border-bottom: 1px solid #4ade80;
}

.ft-more-save-toast.is-visible {
    display: block;
    animation: ft-more-save-toast-in 0.25s ease-out;
}

@keyframes ft-more-save-toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ft-more-modal-close,
.ft-more-back {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.ft-more-modal-body {
    flex: 1;
    overflow: auto;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
}

.ft-more-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #1e293b;
    background: #0b1220;
}

.ft-more-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ft-more-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-top: 6px;
}

.ft-more-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #f8fafc;
    font-size: 0.95rem;
}

.ft-more-textarea {
    resize: vertical;
    min-height: 64px;
}

.ft-more-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ft-more-row .ft-more-input {
    flex: 1;
}

.ft-more-scan-actions {
    display: flex;
    gap: 10px;
    margin: 4px 0 10px;
}

.ft-more-scan-actions .ft-more-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
}

.ft-more-btn-scan {
    background: #f97316;
}

.ft-more-btn-scan:hover {
    background: #ea580c;
}

.ft-more-btn-no-barcode {
    background: #1e293b;
    letter-spacing: 0.02em;
}

.ft-more-btn-no-barcode:hover {
    background: #0f172a;
}

/* NO BARCODE? — Register Product modal (Grocery App01 parity) */
.ft-register-product-host {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 90;
}

.ft-register-product-host.is-open {
    display: block;
}

.ft-register-product-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.ft-register-product-card {
    position: absolute;
    left: 50%;
    top: 12%;
    transform: translateX(-50%);
    width: min(90%, 400px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    color: #1e293b;
    overflow: hidden;
}

.ft-register-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.ft-register-product-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.ft-register-product-subtitle {
    margin: 2px 0 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.ft-register-product-close {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.4rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.ft-register-product-content {
    padding: 20px;
}

.ft-register-input-group {
    margin-bottom: 20px;
}

.ft-register-input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.ft-register-text-input,
.ft-register-barcode-input {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    color: #1e293b;
}

.ft-register-barcode-logic {
    position: relative;
}

.ft-register-barcode-input {
    padding-right: 90px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    color: #64748b;
}

.ft-register-autogen-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #dbeafe;
    color: #2563eb;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
}

.ft-register-help {
    margin: 8px 0 0;
    font-size: 0.625rem;
    font-style: italic;
    line-height: 1.45;
    color: #64748b;
}

.ft-register-help strong {
    font-weight: 700;
    font-style: normal;
    color: #1e293b;
}

.ft-register-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.ft-register-cancel,
.ft-register-create {
    flex: 1;
    padding: 14px 12px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.ft-register-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.ft-register-create {
    background: #2563eb;
    color: #fff;
}

.ft-register-create:disabled,
.ft-register-create.is-disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.ft-register-status {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: #166534;
}

.ft-register-status.is-error {
    color: #b91c1c;
}

/* Select Category modal (Grocery App01 parity) */
.ft-more-category-trigger {
    display: flex;
    align-items: center;
    text-align: left;
    cursor: pointer;
    min-height: 48px;
}

.ft-more-category-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.ft-more-category-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.ft-more-category-name {
    flex: 1;
    color: #f8fafc;
    font-size: 0.95rem;
}

.ft-more-category-arrow {
    color: #94a3b8;
    font-size: 0.7rem;
}

.ft-more-category-placeholder {
    color: #94a3b8;
    font-size: 0.95rem;
}

.ft-category-picker-host {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 95;
}

.ft-category-picker-host.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.ft-category-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.ft-category-picker-card {
    position: relative;
    z-index: 1;
    width: min(90%, 400px);
    max-height: 70%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    color: #333;
    overflow: hidden;
}

.ft-category-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.ft-category-picker-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.ft-category-picker-close {
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.ft-category-picker-list {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 8px 8px;
}

.ft-category-picker-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 12px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    color: #333;
    text-align: left;
    cursor: pointer;
}

.ft-category-picker-option.is-selected {
    background: #f0f8ff;
    border-bottom-color: #2196F3;
}

.ft-category-picker-option-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.ft-category-picker-option-text {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

.ft-category-picker-option.is-selected .ft-category-picker-option-text {
    color: #2196F3;
    font-weight: 600;
}

.ft-category-picker-option-check {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2196F3;
}

.ft-category-picker-empty {
    margin: 24px 16px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.ft-more-btn {
    border: none;
    border-radius: 10px;
    padding: 11px 14px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

.ft-more-btn-primary {
    flex: 1;
    background: #166534;
    color: #fff;
}

.ft-more-btn-secondary {
    flex: 1;
    background: #334155;
    color: #e2e8f0;
}

.ft-more-btn-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #1e293b;
    border: 1px solid #475569;
    color: #f9d71c;
}

/* Modify search — scan-outline style (mobile ProductSearchForModify parity) */
.ft-more-modify-search-row {
    align-items: stretch;
    gap: 10px;
}

.ft-more-modify-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.ft-more-modify-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.ft-more-modify-search-field .ft-more-input {
    width: 100%;
    padding-left: 38px;
}

.ft-more-btn-scan-barcode {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e1b4b;
    border: 1px solid #7c3aed;
    color: #c4b5fd;
    border-radius: 10px;
    cursor: pointer;
}

.ft-more-btn-scan-barcode:hover,
.ft-more-btn-scan-barcode:focus-visible {
    background: #2e1065;
    border-color: #a855f7;
    color: #e9d5ff;
    outline: none;
}

.ft-more-btn-scan-barcode:active {
    transform: scale(0.96);
}

.ft-more-scan-glyph {
    display: block;
}

.ft-more-link-btn {
    align-self: flex-start;
    border: none;
    background: transparent;
    color: #93c5fd;
    font-size: 0.8rem;
    padding: 4px 0 8px;
    cursor: pointer;
    text-decoration: underline;
}

.ft-more-form-hint {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: #86efac;
}

.ft-more-form-hint.is-error {
    color: #fca5a5;
}

.ft-more-photo-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}

.ft-more-origin-section {
    margin-top: 10px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #1e293b;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ft-more-origin-title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
}

.ft-more-photo-actions {
    display: flex;
    gap: 10px;
}

.ft-more-btn-take-photo,
.ft-more-btn-from-gallery {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 10px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

.ft-more-btn-take-photo {
    background: #1976D2;
}

.ft-more-btn-take-photo:hover {
    background: #1565C0;
}

.ft-more-btn-from-gallery {
    background: #7B1FA2;
}

.ft-more-btn-from-gallery:hover {
    background: #6A1B9A;
}

.ft-more-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ft-more-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ft-more-image-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #334155;
}

.ft-more-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ft-more-image-primary {
    position: absolute;
    left: 4px;
    bottom: 4px;
    color: #f9d71c;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.ft-more-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
}

.ft-more-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ft-more-product-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #1e293b;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.ft-more-product-name {
    font-weight: 700;
    color: #f8fafc;
}

.ft-mod-pending-badge {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
    vertical-align: middle;
}

.ft-mod-pending-banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ft-more-product-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.ft-more-empty,
.ft-more-section-label {
    color: #94a3b8;
    font-size: 0.85rem;
}

.ft-more-section-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.7rem;
    margin: 8px 0;
}
