/* Buttons */
.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 168, 143, 0.2);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-logout, .btn-back {
    padding: 0.625rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-medium);
}

.btn-logout:hover, .btn-back:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-analytics {
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    padding: 1.25rem 2rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.2);
    transition: all 0.3s ease;
}

.btn-analytics:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 168, 143, 0.3);
}

/* Cards */
.content-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.content-card:hover {
    border-color: var(--border-medium);
}

.content-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.content-card p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.platform-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
}

.platform-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: 0 12px 48px rgba(0,0,0,0.08);
}

.card-image {
    height: 200px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    transition: all 0.4s ease;
}

.platform-card:hover .card-image {
    transform: scale(1.02);
}

.card-image.cashier {
    background: #667eea;
}

.card-image.retailer {
    background: #f093fb;
}

.card-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255,255,255,0.95);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.platform-card:hover .card-badge {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.card-description {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.card-features {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.card-features ul {
    list-style: none;
    padding: 0;
}

.card-features li {
    padding: 0.625rem 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.card-features li:before {
    content: "✓";
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-light);
    font-family: inherit;
    resize: vertical;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #d0d0d0;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    color: var(--text-medium);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Forgot password link under the login form */
.forgot-password-row {
    display: flex;
    justify-content: flex-end;
    margin: -0.5rem 0 1.25rem;
}

.forgot-password-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand, #d4172b);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Password reset modals (forgot + reset) */
.pw-reset-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.pw-reset-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
}

.pw-reset-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

.pw-reset-close:hover { color: #222; }

.pw-reset-title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
}

.pw-reset-sub {
    margin: 0 0 1.25rem;
    color: var(--text-medium, #555);
    font-size: 0.95rem;
    line-height: 1.45;
}

.pw-reset-alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pw-reset-alert.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.pw-reset-alert.error   { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }

body.dark-mode .pw-reset-card {
    background: #1f2937;
    color: #f9fafb;
}
body.dark-mode .pw-reset-title { color: #f9fafb; }
body.dark-mode .pw-reset-sub   { color: #9ca3af; }
body.dark-mode .pw-reset-close { color: #cbd5e1; }
body.dark-mode .pw-reset-alert.success { background:#064e3b; color:#d1fae5; border-color:#065f46; }
body.dark-mode .pw-reset-alert.error   { background:#7f1d1d; color:#fee2e2; border-color:#991b1b; }

.form-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.form-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.form-card textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-card textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-warning {
    background: #fff8e1;
    border-left: 4px solid #ffa000;
    color: #663c00;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

/* Links */
.platform-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.platform-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.platform-link svg {
    width: 20px;
    height: 20px;
}

/* Dividers */
.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-medium);
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Stats */
.stats-bar {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: fadeIn 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stats-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--border-medium);
}

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

.stat-item {
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* Utility Classes */
.hide-for-admin {
    display: block;
}

/* Logout Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.logout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    padding: 0;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    padding: 2.5rem;
    text-align: center;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.modal-content p {
    font-size: 1.05rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-width: 120px;
}

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-medium);
}

.btn-cancel:hover {
    background: var(--bg-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.btn-confirm:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.3);
}

@media (max-width: 768px) {
    .logout-modal {
        max-width: 90%;
    }

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

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-content p {
        font-size: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-confirm {
        width: 100%;
    }
}

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

.modal .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 780px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.modal .modal-body {
    padding: 2rem;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.upload-prompt h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.upload-prompt p {
    color: #666;
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #00d4aa);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.result-item.success {
    background: #d4edda;
    border-color: #c3e6cb;
}

.result-item.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.result-item.error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.result-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.error-details h4 {
    margin: 0 0 0.5rem 0;
    color: #dc3545;
}

.error-details ul {
    margin: 0;
    padding-left: 1.5rem;
}

.error-details li {
    margin: 0.25rem 0;
    color: #666;
}

@media (max-width: 768px) {
    .modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal .modal-header,
    .modal .modal-body {
        padding: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Performance Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.progress-bar-mini {
    width: 60px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #00d4aa);
    transition: width 0.3s ease;
}

.trend-indicator {
    font-size: 1.25rem;
    display: inline-block;
}

.trend-indicator.positive {
    color: #28a745;
}

.trend-indicator.neutral {
    color: #6c757d;
}

.trend-indicator.negative {
    color: #dc3545;
}

.trend-positive {
    color: #28a745 !important;
    font-weight: 600;
}

.trend-negative {
    color: #dc3545 !important;
    font-weight: 600;
}

.trend-neutral {
    color: #6c757d !important;
}

/* Product Performance Styles */
.product-performance-summary {
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.progress-bar-mini {
    width: 60px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #00d4aa);
    transition: width 0.3s ease;
}

.trend-indicator {
    font-size: 1.25rem;
    display: inline-block;
}

.trend-indicator.positive {
    color: #28a745;
}

.trend-indicator.negative {
    color: #dc3545;
}

.trend-indicator.neutral {
    color: #6c757d;
}

.dashboard-table tbody tr:hover {
    background: #f8f9fa;
    transition: background 0.2s;
}

.dashboard-table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Regional Heat Map Styles */
.regional-heat-map {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.province-path {
    fill: #e0e0e0;
    stroke: #ffffff;
    stroke-width: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.province-path:hover {
    stroke: var(--primary-color);
    stroke-width: 2.5;
    filter: brightness(0.9);
    opacity: 0.95;
}

.province-path.heat-level-0 {
    fill: #f5f5f5;
}

.province-path.heat-level-1 {
    fill: #c8e6c9;
}

.province-path.heat-level-2 {
    fill: #81c784;
}

.province-path.heat-level-3 {
    fill: #4caf50;
}

.province-path.heat-level-4 {
    fill: #2e7d32;
}

.province-path.heat-level-5 {
    fill: #1b5e20;
}


.province-label {
    fill: #333;
    font-size: 12px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
    user-select: none;
}

.heat-map-legend {
    margin-top: 1rem;
    padding: 0.5rem;
}

.legend-gradient {
    height: 12px;
    background: linear-gradient(to right, #f5f5f5, #c8e6c9, #81c784, #4caf50, #2e7d32, #1b5e20);
    border-radius: 6px;
    margin: 0.5rem 0;
}

/* ============================================
   INTERACTIVE MAP STYLES
   ============================================ */

/* Section Header with Toggle Buttons */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* View Toggle Buttons */
.view-toggle {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.view-toggle.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Regional View Container */
.regional-view-container {
    width: 100%;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
}

#locationMap {
    width: 100%;
    height: 100%;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 180px;
}

.map-legend-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.map-legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-marker.high-revenue {
    background: #1b5e20;
}

.legend-marker.medium-revenue {
    background: #4caf50;
}

.legend-marker.low-revenue {
    background: #81c784;
}

.legend-marker.no-revenue {
    background: #e0e0e0;
}

/* Custom Marker Pin - Made Smaller */
.custom-marker {
    background: none;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary-color);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Color variations based on revenue/status */
.marker-pin.high-revenue {
    background: #1b5e20;
}

.marker-pin.medium-revenue {
    background: #4caf50;
}

.marker-pin.low-revenue {
    background: #81c784;
}

.marker-pin.no-revenue {
    background: #e0e0e0;
}

.marker-content {
    transform: rotate(45deg);
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
}

/* Pulse animation for high revenue stores */
.marker-pin.high-revenue {
    animation: pulse-marker 2s infinite;
}

@keyframes pulse-marker {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(27, 94, 32, 0.7);
    }
    50% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 8px rgba(27, 94, 32, 0);
    }
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.map-popup {
    padding: 1rem;
}

.map-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.map-popup-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.map-popup-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.map-popup-metric {
    text-align: center;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.map-popup-metric-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.map-popup-metric-label {
    font-size: 0.625rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
    }
    
    .map-legend {
        bottom: 10px;
        right: 10px;
        padding: 0.75rem;
        min-width: 140px;
    }
    
    .map-legend-title {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .map-legend-item {
        font-size: 0.7rem;
    }
    
    .map-popup-metrics {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Receipt Analysis Styles */
.receipt-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.receipt-info-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.receipt-info-box.full-width {
    grid-column: 1 / -1;
}

.receipt-info-box h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.receipt-info-box .detail-row {
    margin-bottom: 0.75rem;
}

#modalReceiptItems {
    margin-top: 0.5rem;
}

#modalReceiptItems ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#modalReceiptItems li {
    padding: 0.75rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#modalReceiptItems li .item-desc {
    flex: 1;
    font-weight: 500;
}

#modalReceiptItems li .item-qty {
    margin-right: 1rem;
    color: #666;
}

#modalReceiptItems li .item-price {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .receipt-analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* Language Selector */
.language-selector {
    position: relative;
    margin-left: auto;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.language-btn:hover {
    background: #f5f5f5;
    border-color: var(--primary-color);
}

.language-btn svg:first-child {
    color: var(--primary-color);
}

.language-btn svg:last-child {
    transition: transform 0.3s;
}

.language-btn.active svg:last-child {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

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

.language-group {
    padding: 0.5rem 0;
}

.language-group:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.language-group-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-option,
.language-option-hub {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.language-option:hover:not(.disabled),
.language-option-hub:hover:not(.disabled) {
    background: #f5f5f5;
    color: var(--primary-color);
}

.language-option.active,
.language-option-hub.active {
    background: #e8f5f3;
    color: var(--primary-color);
    font-weight: 600;
}

.language-option.disabled,
.language-option-hub.disabled {
    color: #ccc;
    cursor: not-allowed;
    position: relative;
}

.language-option.disabled::after,
.language-option-hub.disabled::after {
    content: " (Coming Soon)";
    font-size: 0.75rem;
    color: #999;
}

@media (max-width: 768px) {
    .language-selector {
        margin-left: 0.5rem;
    }
    
    .language-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .language-btn span {
        display: none;
    }
}



/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 6px;
    color: #666;
}

.toggle-password:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.toggle-password .eye-icon {
    display: block;
    line-height: 1;
    transition: all 0.3s;
}
