@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


/* === NATIVE MOBILE APP STYLES === */
/* Inspired by iOS and Material Design */

:root {
    --accent-red: #FF0000;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --border-color: #D2D2D7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    /* Safe area insets for notch */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);
    --safe-area-right: env(safe-area-inset-right);
}

/* === RESET & BASE === */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
    touch-action: pan-y;
}

/* Desktop: Facebook-style 3-column layout */
@media (min-width: 768px) {
    body {
        background: var(--bg-primary);
    }

    #app {
        background: var(--bg-primary);
        min-height: 100vh;
        position: relative;
    }
}

body {
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 32px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

p {
    margin: 0;
}

/* === CONTAINER === */
.container {
    width: 100%;
    padding: 16px;
    margin: 0 auto;
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: calc(80px + var(--safe-area-bottom));
}

/* Desktop: content centered with max-width like Facebook feed */
@media (min-width: 768px) {
    .container {
        max-width: 680px;
        margin: 0 auto;
        padding: 20px 16px;
        padding-bottom: 20px;
        margin-left: calc(280px + ((100vw - 280px - 680px) / 2));
    }

    /* Centered container for pages without sidebar */
    .container-centered {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* === PAGE HEADER (Native Style) === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: var(--safe-area-top);
}

/* === PAGE HEADER FIXED (for back navigation) === */
.page-header-fixed {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    margin-bottom: 0;
}

    .page-header-fixed .btn-icon {
        flex-shrink: 0;
    }

    .page-header-fixed h1 {
        font-size: 20px;
        font-weight: 700;
        margin: 0;
        letter-spacing: -0.02em;
    }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 20px 0;
    margin-bottom: 8px;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

    .header-left h1 {
        font-size: 32px;
        font-weight: 700;
        letter-spacing: -0.04em;
    }

.header-right {
    display: flex;
    gap: 8px;
}

/* === BUTTON ICON (iOS Style) === */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(120, 120, 128, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

    .btn-icon:active {
        transform: scale(0.92);
        background: rgba(120, 120, 128, 0.18);
    }

    .btn-icon svg {
        color: var(--text-primary);
    }

/* === BUTTONS (Native Style) === */
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.25);
}

    .btn-primary:active {
        transform: scale(0.97);
        box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
    }

    .btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

.btn-secondary {
    background: rgba(120, 120, 128, 0.12);
    color: var(--text-primary);
}

    .btn-secondary:active {
        transform: scale(0.97);
        background: rgba(120, 120, 128, 0.18);
    }

/* === CARDS (iOS/Material Style) === */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.loyalty-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

    .loyalty-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-md);
    }

.logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.points-badge {
    background: rgba(255, 0, 0, 0.08);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--accent-red);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

/* === ACCOUNT MENU (Bottom Sheet iOS Style) === */
.account-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(12px + var(--safe-area-bottom));
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.account-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

    .account-menu-header::before {
        content: '';
        width: 36px;
        height: 5px;
        background: rgba(120, 120, 128, 0.3);
        border-radius: 10px;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
    }

    .account-menu-header h3 {
        font-size: 20px;
        font-weight: 700;
        letter-spacing: -0.03em;
    }

.account-menu-content {
    padding: 20px;
}

.account-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .account-info-item:last-of-type {
        border-bottom: none;
    }

.info-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 16px;
}

.info-value {
    font-size: 15px;
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
    font-weight: 500;
}

    .info-value.code {
        font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
        font-size: 13px;
        background: rgba(120, 120, 128, 0.08);
        padding: 8px 12px;
        border-radius: 8px;
        display: inline-block;
    }

/* === FORMS (Native Style) === */
input[type="email"],
input[type="password"],
input[type="number"],
.form-input {
    width: 100%;
    padding: 16px;
    border: none;
    background: rgba(120, 120, 128, 0.12);
    border-radius: var(--radius-sm);
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

    input:focus, .form-input:focus {
        outline: none;
        background: rgba(120, 120, 128, 0.18);
        box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
    }

input::placeholder {
    color: var(--text-secondary);
}

/* === LOADING (Native Style) === */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(120, 120, 128, 0.2);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease-out;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(120, 120, 128, 0.08);
    border-radius: 50%;
    color: var(--text-secondary);
}

.empty-state-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.03em;
}

.empty-state-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === LOGIN SCREEN (Native Style) === */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
    background: var(--bg-primary);
}

/* Desktop: login centered without sidebar */
@media (min-width: 768px) {
    .login-container {
        max-width: 480px;
        margin: 0 auto;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 48px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    margin-bottom: 16px;
}

.login-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
}

.login-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

/* === AUTH BUTTONS === */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-oauth {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.btn-google {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .btn-google:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .btn-google svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

.btn-apple {
    background: black;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

    .btn-apple:active {
        transform: scale(0.98);
        background: #1a1a1a;
    }

    .btn-apple svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

.btn-email {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid rgba(0, 0, 0, 0.08);
}

    .btn-email:active {
        transform: scale(0.98);
        background: rgba(0, 0, 0, 0.02);
    }

/* === DIVIDER === */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.divider-text {
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* === EMAIL FORM === */
.email-form {
    width: 100%;
}

.email-form-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px 0;
    text-align: center;
    letter-spacing: -0.03em;
}

.form-group {
    margin-bottom: 16px;
}

    .form-group label {
        display: block;
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 8px;
        color: var(--text-primary);
        letter-spacing: -0.01em;
    }

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.form-input,
.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-secondary);
    font-size: 17px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

    .form-input:focus,
    .form-control:focus {
        outline: none;
        border-color: var(--accent-red);
        box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
    }

    .form-input:disabled,
    .form-control:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .form-input::placeholder,
    .form-control::placeholder {
        color: var(--text-secondary);
    }

.form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.form-footer-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--accent-red);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    letter-spacing: -0.01em;
}

    .btn-text-link:active {
        opacity: 0.7;
    }

    .btn-text-link:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* === ERROR & SUCCESS MESSAGES === */
.error-message,
.alert-error {
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(255, 59, 48, 0.08);
    border: 2px solid rgba(255, 59, 48, 0.2);
    border-radius: var(--radius-sm);
    color: #FF3B30;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

    .error-message svg,
    .alert-error svg {
        flex-shrink: 0;
    }

.alert-error {
    max-width: 100%;
}

.success-message,
.alert-success {
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(52, 199, 89, 0.08);
    border: 2px solid rgba(52, 199, 89, 0.2);
    border-radius: var(--radius-sm);
    color: #34C759;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

    .success-message svg,
    .alert-success svg {
        flex-shrink: 0;
    }

.alert-success {
    max-width: 100%;
}

/* === HAPTIC FEEDBACK (iOS) === */
@supports (-webkit-touch-callout: none) {
    .btn-primary:active,
    .btn-secondary:active,
    .btn-icon:active,
    .loyalty-card:active,
    .role-card:active {
        -webkit-tap-highlight-color: transparent;
    }
}

/* === SEARCH BAR === */
.search-bar-container {
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(120, 120, 128, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

    .search-bar:focus-within {
        background: rgba(120, 120, 128, 0.18);
        box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
    }

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

    .search-input:focus {
        background: transparent;
        box-shadow: none;
    }

    .search-input::placeholder {
        color: var(--text-secondary);
    }

.search-clear {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(120, 120, 128, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .search-clear:active {
        transform: scale(0.9);
        background: rgba(120, 120, 128, 0.3);
    }

    .search-clear svg {
        opacity: 0.6;
    }

.search-results {
    margin-bottom: 24px;
}

/* === CARDS GRID (2x2 Layout) === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.loyalty-card-square {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 1;
}

    .loyalty-card-square:active {
        transform: scale(0.95);
        box-shadow: var(--shadow-md);
    }

.card-square-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
    overflow: hidden;
}

    .card-square-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.loyalty-card-square h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.points-badge-square {
    background: rgba(255, 0, 0, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-red);
}

/* === QR CODE CARD === */
.qr-code-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.qr-code-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code-container {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 16px;
}

.qr-code-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === KLARNA STYLE CARDS === */
.klarna-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.klarna-card {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .klarna-card::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 150%;
        height: 150%;
        background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
        pointer-events: none;
    }

    .klarna-card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 12px rgba(255, 0, 0, 0.15);
    }

.klarna-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.klarna-card-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

    .klarna-card-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.klarna-card-header h4 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.klarna-card-points {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.points-large {
    color: white;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.points-label {
    color: white;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.klarna-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

    .klarna-card-footer svg {
        transition: transform 0.2s ease;
    }

.klarna-card:active .klarna-card-footer svg {
    transform: translateX(4px);
}

/* === RESPONSIVE UTILITIES === */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }
}

/* === BOTTOM NAVIGATION === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + var(--safe-area-bottom));
    z-index: 999;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Desktop sidebar navigation - Facebook style */
@media (min-width: 768px) {
    .bottom-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        padding: 8px 4px;
        flex-direction: column !important;
        justify-content: space-between !important;
        gap: 0;
        border-top: none;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: none;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex !important;
    }

    /* Navigation groups */
    .nav-items-top {
        display: flex;
        flex-direction: column;
        gap: 0;
        flex: 0 0 auto;
    }

    .nav-items-bottom {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: auto;
        padding-bottom: 8px;
    }

    /* Hide scrollbar but keep functionality */
    .bottom-nav::-webkit-scrollbar {
        width: 8px;
    }

    .bottom-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .bottom-nav::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }

        .bottom-nav::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }

    /* Sidebar logo/header - Facebook style */
    .bottom-nav::before {
        content: 'Punto.';
        display: block;
        padding: 12px 8px 8px 8px;
        margin-bottom: 4px;
        font-size: 26px;
        font-weight: 800;
        background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: -0.04em;
        border-bottom: none;
    }

    .nav-item {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 8px !important;
        gap: 12px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        margin: 0 !important;
        transition: background 0.15s ease !important;
        min-height: auto !important;
        height: auto !important;
        border: none !important;
        background: transparent !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        flex: none !important;
        text-align: left !important;
        display: flex !important;
    }

        .nav-item span {
            margin: 0 !important;
            padding: 0 !important;
            font-size: 15px !important;
            font-weight: 600 !important;
            line-height: 20px !important;
            color: var(--text-primary) !important;
            text-align: left !important;
            display: block !important;
        }

        .nav-item svg {
            width: 20px !important;
            height: 20px !important;
            flex-shrink: 0 !important;
            display: block !important;
        }

        .nav-item.active {
            background: #E4E6EB !important;
            color: var(--text-primary) !important;
            font-weight: 600 !important;
            border: none !important;
        }

            .nav-item.active svg {
                color: var(--accent-red) !important;
                stroke: var(--accent-red) !important;
            }

        .nav-item:hover {
            background: #F2F3F5 !important;
            border: none !important;
        }

        .nav-item.active:hover {
            background: #E4E6EB !important;
            border: none !important;
        }

    /* Sidebar footer - Facebook style */
    .nav-footer {
        padding: 12px 8px 8px 8px;
        font-size: 12px;
        color: #65676B;
        line-height: 1.3333;
        font-weight: 400;
    }

        .nav-footer span {
            display: inline !important;
            margin: 0 !important;
            padding: 0 !important;
            font-size: 12px !important;
            color: #65676B !important;
            font-weight: 400 !important;
            line-height: 1.3333 !important;
        }
}

/* === MOBILE NAVIGATION (default) === */
@media (max-width: 767px) {

    .rewards-desktop-scroll {
        display: none !important;
    }

    .rewards-mobile-config {
        display: block !important;
    }

    /* Make container divs transparent on mobile */
    .nav-items-top,
    .nav-items-bottom {
        display: contents !important;
    }

    /* Hide footer on mobile */
    .nav-footer {
        display: none !important;
    }

    .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 0;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: -0.01em;
    }

        .nav-item svg {
            width: 24px;
            height: 24px;
            stroke: currentColor;
            transition: all 0.2s ease;
        }

        .nav-item.active {
            color: var(--accent-red);
        }

        .nav-item:active {
            transform: scale(0.95);
        }

        .nav-item span {
            margin-top: 2px;
        }
}

/* === SHOPS LIST === */
.shops-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

    .shop-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-md);
    }

.shop-image-large {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
    overflow: hidden;
}

    .shop-image-large img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.shop-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .shop-info h4 {
        font-size: 20px;
        font-weight: 700;
        margin: 0;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

.shop-category-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 0;
    margin: 0 0 4px 0;
    color: var(--accent-red);
    letter-spacing: 0.5px;
}

.shop-address-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

    .shop-address-row svg {
        flex-shrink: 0;
        color: var(--text-secondary);
        opacity: 0.7;
    }

    .shop-address-row span {
        font-size: 14px;
        color: var(--text-secondary);
        line-height: 1.4;
    }

.shop-arrow {
    flex-shrink: 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    opacity: 0.6;
}

/* === MERCHANT SPECIFIC === */
.merchant-container {
    width: 100%;
    padding: 16px;
    margin: 0 auto;
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: calc(80px + var(--safe-area-bottom));
}

/* Desktop: merchant content centered like Facebook */
@media (min-width: 768px) {
    .merchant-container {
        max-width: 680px;
        margin: 0 auto;
        padding: 20px 16px;
        padding-bottom: 20px;
        margin-left: calc(280px + ((100vw - 280px - 680px) / 2));
    }

    .rewards-desktop-scroll {
        display: block !important;
    }

    .rewards-mobile-config {
        display: none !important;
    }

    .reward-card-wrapper {
        width: calc(25% - 6px) !important;
    }
}

.content-with-nav {
    padding-bottom: calc(80px + var(--safe-area-bottom));
}

/* Desktop: remove bottom padding for sidebar layout */
@media (min-width: 768px) {
    .content-with-nav {
        padding-bottom: 20px;
    }
}

/* === STATS & MISC === */
.stats-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-red);
    letter-spacing: -0.03em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
}

.empty-state-small {
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* === TRANSACTIONS LIST === */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.transaction-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(52, 199, 89, 0.12);
}

    .transaction-icon svg {
        stroke: #34C759;
    }

    .transaction-icon.credit {
        background: rgba(52, 199, 89, 0.12);
    }

        .transaction-icon.credit svg {
            stroke: #34C759;
        }

    .transaction-icon.debit {
        background: rgba(255, 59, 48, 0.12);
    }

        .transaction-icon.debit svg {
            stroke: #FF3B30;
        }

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.transaction-client-service {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.transaction-client {
    font-weight: 600;
}

.transaction-separator {
    color: var(--text-secondary);
    margin: 0 4px;
}

.transaction-service {
    color: var(--text-secondary);
    font-weight: 500;
}

.transaction-datetime {
    font-size: 13px;
    color: var(--text-secondary);
}

.transaction-amounts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.transaction-amount {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.transaction-points {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* === DATE FILTER === */
.date-filter-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.date-filter-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .date-filter-buttons::-webkit-scrollbar {
        display: none;
    }

.filter-chip {
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

    .filter-chip:active {
        transform: scale(0.95);
    }

    .filter-chip.active {
        background: var(--accent-red);
        color: white;
        border-color: var(--accent-red);
    }

/* === SWIPEABLE TRANSACTION === */
.swipeable-transaction {
    position: relative;
    transition: transform 0.2s ease-out;
}

.delete-action {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: #FF3B30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

    .delete-action svg {
        width: 24px;
        height: 24px;
    }

/* === DELETE CONFIRM POPUP === */
.delete-confirm-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
}

.delete-confirm-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.delete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: rgba(255, 59, 48, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF3B30;
}

.btn-danger {
    background: #FF3B30;
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-danger:active {
        transform: scale(0.97);
        background: #E60000;
    }

    .btn-danger:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* === REWARDS STYLES === */
.rewards-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .rewards-filter::-webkit-scrollbar {
        display: none;
    }

    .rewards-filter .filter-chip {
        display: flex;
        align-items: center;
        gap: 6px;
    }

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.reward-card-client {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

    .reward-card-client:active {
        transform: scale(0.97);
        box-shadow: var(--shadow-md);
    }

    .reward-card-client.unlocked {
        border: 2px solid #34C759;
    }

.reward-card-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .reward-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.reward-placeholder-client {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.08) 0%, rgba(255, 0, 0, 0.12) 100%);
    color: var(--accent-red);
}

.reward-unlocked-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: #34C759;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.4);
}

.reward-card-content {
    padding: 12px;
}

    .reward-card-content h4 {
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 8px 0;
        letter-spacing: -0.01em;
        line-height: 1.3;
    }

.reward-points-display {
    margin-bottom: 12px;
}

.points-required {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-red);
    background: rgba(255, 0, 0, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
}

.progress-bar-large {
    height: 12px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red) 0%, #E60000 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.points-missing {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.reward-available-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #34C759;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

/* === MERCHANT REWARDS === */
.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.reward-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .reward-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.reward-placeholder {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.08) 0%, rgba(255, 0, 0, 0.12) 100%);
    color: var(--accent-red);
}

.reward-info {
    flex: 1;
    min-width: 0;
}

    .reward-info h3 {
        font-size: 17px;
        font-weight: 600;
        margin: 0 0 4px 0;
        letter-spacing: -0.02em;
    }

    .reward-info p {
        font-size: 14px;
        color: var(--text-secondary);
        margin: 0 0 8px 0;
        line-height: 1.4;
    }

.reward-points {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reward-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === REWARD DETAIL === */
.reward-detail-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.reward-detail-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .reward-detail-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.reward-placeholder-large {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.08) 0%, rgba(255, 0, 0, 0.15) 100%);
    color: var(--accent-red);
}

.reward-detail-points {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 0, 0, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.reward-unlocked-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #34C759 0%, #30B350 100%);
    border-radius: var(--radius-md);
    color: white;
    margin: 24px 0;
}

.reward-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === REDEMPTION SUCCESS POPUP === */
.redemption-success-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.redemption-success-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpBounce {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* === CLAIMED & USED REWARDS === */
.claimed-rewards-list,
.used-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.claimed-reward-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.claimed-reward-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.claimed-reward-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .claimed-reward-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.claimed-reward-info {
    flex: 1;
    min-width: 0;
}

    .claimed-reward-info h4 {
        font-size: 17px;
        font-weight: 600;
        margin: 0 0 4px 0;
        letter-spacing: -0.02em;
    }

    .claimed-reward-info p {
        font-size: 13px;
        color: var(--text-secondary);
        margin: 0;
    }

.claimed-reward-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.used-reward-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 12px;
    align-items: center;
}

.used-reward-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .used-reward-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.used-reward-info {
    flex: 1;
    min-width: 0;
}

    .used-reward-info h4 {
        font-size: 17px;
        font-weight: 600;
        margin: 0 0 4px 0;
        letter-spacing: -0.02em;
    }

.used-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(52, 199, 89, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34C759;
    flex-shrink: 0;
}

/* === SUCCESS POPUP (Merchant Scan) === */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.success-popup-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

/* === PROFILE MENU === */
.profile-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .profile-button:active {
        transform: scale(0.95);
    }

.profile-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.25);
}

.profile-circle-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.3);
    margin: 0 auto;
}

.profile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 60px 20px 20px;
    z-index: 1001;
    animation: fadeIn 0.2s ease-out;
}

.profile-menu {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-menu-header {
    padding: 24px;
    text-align: center;
}

.profile-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.profile-menu-item {
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

    .profile-menu-item:hover {
        background: rgba(0, 0, 0, 0.03);
    }

    .profile-menu-item:active {
        background: rgba(0, 0, 0, 0.06);
    }

/* === FLOATING BUTTON === */
.btn-floating {
    position: fixed;
    bottom: calc(20px + var(--safe-area-bottom));
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

    .btn-floating:active {
        transform: scale(0.9);
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === CLIENTS LIST === */
.clients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.client-info {
    flex: 1;
    min-width: 0;
}

    .client-info h4 {
        font-size: 17px;
        font-weight: 600;
        margin: 0 0 4px 0;
        letter-spacing: -0.02em;
    }

    .client-info p {
        font-size: 13px;
        color: var(--text-secondary);
        margin: 0 0 6px 0;
    }

.client-stats {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

    .client-stats span:first-child {
        color: var(--accent-red);
        font-weight: 600;
    }

/* === SERVICE SELECTION === */
.service-selection-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.service-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-primary);
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

    .service-button:active {
        transform: scale(0.97);
        background: rgba(255, 0, 0, 0.05);
        border-color: var(--accent-red);
    }

    .service-button svg {
        color: var(--accent-red);
    }

/* === SUGGESTIONS DROPDOWN === */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .suggestion-item:hover {
        background: rgba(0, 0, 0, 0.03);
    }

    .suggestion-item:active {
        background: rgba(0, 0, 0, 0.06);
    }

.suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.suggestion-email {
    font-size: 13px;
    color: var(--text-secondary);
}

/* === SUGGESTIONS LIST === */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .suggestion-item:hover,
    .suggestion-item:active {
        background: rgba(0, 0, 0, 0.03);
    }

.suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.suggestion-email {
    font-size: 13px;
    color: var(--text-secondary);
}

/* === SERVICE SELECTION === */
.service-selection-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 60px 24px 24px 24px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.service-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: rgba(255, 0, 0, 0.05);
    border: 2px solid rgba(255, 0, 0, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-red);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .service-button:hover {
        background: rgba(255, 0, 0, 0.08);
        border-color: rgba(255, 0, 0, 0.2);
    }

    .service-button:active {
        transform: scale(0.97);
        background: rgba(255, 0, 0, 0.12);
    }

    .service-button svg {
        width: 24px;
        height: 24px;
    }

/* === WEBCAM VIEW === */
.webcam-view {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

    .webcam-view video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* === SUGGESTIONS AUTOCOMPLETE === */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .suggestion-item:last-child {
        border-bottom: none;
    }

    .suggestion-item:hover {
        background: rgba(0, 0, 0, 0.03);
    }

    .suggestion-item:active {
        background: rgba(0, 0, 0, 0.06);
    }

.suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.suggestion-email {
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === SERVICE SELECTION === */
.service-selection-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 60px 24px 24px 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.service-button {
    background: var(--bg-primary);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

    .service-button svg {
        width: 32px;
        height: 32px;
        stroke: var(--accent-red);
    }

    .service-button:active {
        transform: scale(0.95);
        background: var(--accent-red);
        color: white;
        border-color: var(--accent-red);
    }

        .service-button:active svg {
            stroke: white;
        }

/* === SHOP HEADER WITH COVER === */
.btn-icon-back {
    position: absolute;
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-icon-back:active {
        transform: scale(0.9);
        background: rgba(0, 0, 0, 0.7);
    }

.shop-header-wrapper {
    position: relative;
    margin: -16px -16px 0 -16px;
    overflow: hidden;
}

.shop-cover-photo {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    background-size: cover;
    background-position: center;
}

.shop-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(255, 0, 0, 0.15) 100%);
}

.shop-profile-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-top: -30px;
    padding: 20px;
    position: relative;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.shop-logo-profile {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.3);
    border: 4px solid var(--bg-secondary);
    margin-top: -50px;
    margin-bottom: 16px;
    overflow: hidden;
}

    .shop-logo-profile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.shop-info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-name {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.shop-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

    .shop-address svg {
        flex-shrink: 0;
        opacity: 0.7;
    }

.shop-points-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(255, 0, 0, 0.08) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 0, 0, 0.1);
}

    .shop-points-display > div {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .shop-points-display .points-number {
        font-size: 32px;
        font-weight: 700;
        color: var(--accent-red);
        letter-spacing: -0.03em;
        line-height: 1;
    }

    .shop-points-display .points-label {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-secondary);
    }

/* === SHOP DETAIL HEADER === */
.btn-icon-back {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: white;
    transition: all 0.2s ease;
}

    .btn-icon-back:active {
        transform: scale(0.95);
    }

.shop-cover-header {
    position: relative;
    margin: -16px -16px 0 -16px;
    overflow: hidden;
}

.shop-cover-photo {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.shop-cover-placeholder {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(255, 0, 0, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-profile-info {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-top: -40px;
    position: relative;
    padding: 24px 16px;
    text-align: center;
}

.shop-logo-large-cover {
    width: 100px;
    height: 100px;
    margin: -70px auto 0;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.25);
    overflow: hidden;
    border: 4px solid var(--bg-secondary);
}

    .shop-logo-large-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.points-display-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(255, 0, 0, 0.1) 100%);
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.points-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-red);
    letter-spacing: -0.03em;
    line-height: 1;
}

/* === SHOP COVER PHOTO === */
.btn-icon-back {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* === USER ICON & FIXED BOTTOM BUTTON === */
.user-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.25);
}

.icon-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .icon-button:active {
        transform: scale(0.95);
    }

.fixed-bottom-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
    background: var(--bg-primary);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

    .fixed-bottom-button .btn-primary {
        width: 100%;
        margin: 0;
    }

/* === SETUP PAGE === */
.setup-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
    background: var(--bg-primary);
}

/* Desktop: setup centered without sidebar */
@media (min-width: 768px) {
    .setup-container {
        max-width: 520px;
        margin: 0 auto;
    }
}

.setup-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 500px;
}

.setup-logo {
    margin-bottom: 24px;
}

.setup-title {
    font-size: 56px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
}

.setup-options {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
}

    .role-card:hover {
        border-color: var(--accent-red);
        box-shadow: 0 4px 16px rgba(255, 0, 0, 0.15);
        transform: translateY(-2px);
    }

    .role-card:active {
        transform: scale(0.98);
    }

    .role-card:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.role-icon-wrapper {
    flex-shrink: 0;
}

.role-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.role-content {
    flex: 1;
    min-width: 0;
}

.role-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.role-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.role-arrow {
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.role-card:hover .role-arrow {
    transform: translateX(4px);
    color: var(--accent-red);
}

.setup-error {
    width: 100%;
    max-width: 500px;
    margin-top: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid #FF3B30;
}

    .setup-error .error-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 16px;
        background: rgba(255, 59, 48, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #FF3B30;
    }

    .setup-error .error-content {
        text-align: center;
    }

    .setup-error details {
        text-align: left;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

        .setup-error details summary {
            outline: none;
            user-select: none;
        }

            .setup-error details summary:hover {
                color: var(--text-primary);
            }

/* === STAT DIFF & DATE FILTERS === */
.stat-diff {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

    .stat-diff.positive {
        color: #34C759;
    }

    .stat-diff.negative {
        color: #FF3B30;
    }

.date-filter-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.date-filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .filter-chip:hover {
        border-color: var(--accent-red);
        background: rgba(255, 0, 0, 0.05);
    }

    .filter-chip.active {
        background: var(--accent-red);
        color: white;
        border-color: var(--accent-red);
    }

.fixed-bottom-button .btn-primary {
    width: 100%;
    margin: 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.btn-icon-back:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.6);
}

.shop-cover-header {
    width: 100%;
    margin: 0 -16px 24px -16px;
    position: relative;
}

.shop-cover-photo {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.shop-cover-placeholder {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.08) 0%, rgba(255, 0, 0, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-profile-info {
    background: var(--bg-secondary);
    padding: 0 16px 20px 16px;
    text-align: center;
    position: relative;
    margin-top: -40px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.shop-logo-large-cover {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-red), #E60000);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.25);
    overflow: hidden;
    margin: -50px auto 0;
    border: 4px solid var(--bg-secondary);
}

    .shop-logo-large-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* === CUSTOM MAP STYLES === */
.custom-marker {
    background: transparent;
    border: none;
}

.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.custom-popup .leaflet-popup-content {
    margin: 12px;
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

/* Cluster personalizzati */
.marker-cluster {
    background: rgba(255, 0, 0, 0.1);
    border: 3px solid #FF0000;
    border-radius: 50%;
    text-align: center;
    font-weight: 700;
    color: white;
}

    .marker-cluster div {
        width: 34px;
        height: 34px;
        margin: 3px;
        border-radius: 50%;
        background: #FF0000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.marker-cluster-small {
    background: rgba(255, 0, 0, 0.1);
}

    .marker-cluster-small div {
        background: #FF0000;
    }

.marker-cluster-medium {
    background: rgba(255, 0, 0, 0.15);
}

    .marker-cluster-medium div {
        background: #E60000;
    }

.marker-cluster-large {
    background: rgba(255, 0, 0, 0.2);
}

    .marker-cluster-large div {
        background: #CC0000;
    }

.marker-cluster span {
    font-size: 14px;
    font-weight: 700;
    line-height: 34px;
}

/* === MAP STYLES === */
#map {
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
}

.leaflet-popup-content {
    margin: 16px;
    min-width: 200px;
}

.leaflet-popup-tip-container {
    display: none;
}


/* === QR POPUP === */
.qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.qr-popup-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUpBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.claimed-reward-header {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .claimed-reward-header:active {
        opacity: 0.7;
    }

/* === REWARD CLAIMED BANNER === */
.reward-claimed-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #34C759 0%, #30B350 100%);
    border-radius: var(--radius-md);
    color: white;
    margin: 24px 0;
}

/* === MERCHANT SCAN STYLES === */
.scan-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.camera-view {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.webcam-view {
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

    .webcam-view video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.scan-frame {
    width: 240px;
    height: 240px;
    position: relative;
}

.scan-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent-red);
}

    .scan-corner.top-left {
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: none;
        border-radius: 8px 0 0 0;
    }

    .scan-corner.top-right {
        top: 0;
        right: 0;
        border-left: none;
        border-bottom: none;
        border-radius: 0 8px 0 0;
    }

    .scan-corner.bottom-left {
        bottom: 0;
        left: 0;
        border-right: none;
        border-top: none;
        border-radius: 0 0 0 8px;
    }

    .scan-corner.bottom-right {
        bottom: 0;
        right: 0;
        border-left: none;
        border-top: none;
        border-radius: 0 0 8px 0;
    }

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-red) 50%, transparent 100%);
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(240px);
        opacity: 0;
    }
}

.scan-instruction {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

.manual-entry-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.client-found-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 60px 24px 24px 24px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.points-preview {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(255, 0, 0, 0.08) 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
    border: 1px solid rgba(255, 0, 0, 0.1);
}

/* === WEBCAM VIEW === */
.webcam-view {
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webcam-view .scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    z-index: 10;
}

/* === FIXED BOTTOM BUTTON === */
.fixed-bottom-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
    background: linear-gradient(to top, var(--bg-primary) 0%, var(--bg-primary) 80%, transparent 100%);
    z-index: 100;
}

    .fixed-bottom-button .btn-primary {
        box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
    }

/* === CLIENTS PAGE ENHANCED === */
.sort-dropdown {
    padding: 6px 32px 6px 12px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5L6 8L9 5' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.clients-list-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-card-enhanced {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all 0.2s ease;
}

    .client-card-enhanced.inactive {
        border-left: 4px solid #FF9500;
    }

    .client-card-enhanced:active {
        transform: scale(0.98);
    }

.inactive-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FF9500;
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.client-avatar-enhanced {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.client-name-badge {
    flex: 1;
    min-width: 0;
}

    .client-name-badge h4 {
        margin: 0 0 4px 0;
        font-size: 17px;
        font-weight: 600;
        color: var(--text-primary);
    }

.category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.badge-vip {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.badge-regular {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: #000;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
}

.client-stats-enhanced {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

    .stat-row.inactive-alert {
        color: #FF9500;
        font-weight: 600;
    }

.client-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action-outline {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-action-outline:hover {
        border-color: var(--accent-red);
        background: rgba(255, 0, 0, 0.05);
        color: var(--accent-red);
    }

.btn-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-action-icon:hover {
        border-color: var(--accent-red);
        background: rgba(255, 0, 0, 0.05);
    }

/* === INSIGHTS PAGE === */
.insights-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.subsection-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

/* Alert Cards */
.alert-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #ccc;
}

    .alert-card.alert-urgent {
        border-left-color: #FF3B30;
        background: rgba(255, 59, 48, 0.05);
    }

    .alert-card.alert-warning {
        border-left-color: #FF9500;
        background: rgba(255, 149, 0, 0.05);
    }

    .alert-card.alert-positive {
        border-left-color: #34C759;
        background: rgba(52, 199, 89, 0.05);
    }

    .alert-card.alert-opportunity {
        border-left-color: #007AFF;
        background: rgba(0, 122, 255, 0.05);
    }

.alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.alert-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.alert-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-description {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Chart */
.chart-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.simple-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 120px;
    margin-bottom: 16px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 4px;
}

.bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.bar-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.chart-stats {
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

    .chart-stats p {
        margin: 0 0 4px 0;
        font-size: 14px;
        color: var(--text-secondary);
    }

    .chart-stats .trend-text {
        display: flex;
        align-items: center;
        font-weight: 600;
    }

    .chart-stats .positive {
        color: #34C759;
    }

    .chart-stats .negative {
        color: #FF3B30;
    }

/* Services */
.services-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.service-row {
    margin-bottom: 16px;
}

.service-info {
    margin-bottom: 4px;
}

.service-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
}

.service-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
}

.service-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.service-stats {
    font-size: 13px;
    color: var(--text-secondary);
}

.service-tip {
    margin: 16px 0 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

    .service-tip svg {
        flex-shrink: 0;
    }

/* Timeframe */
.timeframe-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.timeframe-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.timeframe-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

.timeframe-bar {
    flex: 1;
    height: 24px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.timeframe-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.timeframe-value {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 120px;
    text-align: right;
}

/* Loyalty */
.loyalty-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-top: 16px;
}

.loyalty-levels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.loyalty-level-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid #ccc;
}

    .loyalty-level-card.vip-card {
        border-left-color: #FFD700;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, var(--bg-secondary) 100%);
    }

    .loyalty-level-card.regular-card {
        border-left-color: #C0C0C0;
        background: linear-gradient(135deg, rgba(192, 192, 192, 0.08) 0%, var(--bg-secondary) 100%);
    }

    .loyalty-level-card.occasional-card {
        border-left-color: #A8A8A8;
        background: linear-gradient(135deg, rgba(168, 168, 168, 0.08) 0%, var(--bg-secondary) 100%);
    }

.loyalty-level-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

    .loyalty-level-header svg {
        flex-shrink: 0;
    }

.vip-card .loyalty-level-header svg {
    fill: #FFD700;
}

.regular-card .loyalty-level-header svg {
    fill: #C0C0C0;
}

.occasional-card .loyalty-level-header svg {
    stroke: #A8A8A8;
}

.loyalty-level-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.loyalty-level-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.loyalty-level-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.loyalty-stat {
    display: flex;
    flex-direction: column;
}

.loyalty-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.loyalty-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.loyalty-level-percent {
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.loyalty-summary {
    margin: 16px 0 0 0;
    padding: 12px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

    .loyalty-summary svg {
        flex-shrink: 0;
        stroke: #007AFF;
    }

    .loyalty-summary strong {
        color: var(--text-primary);
        font-weight: 700;
    }

/* Comparison */
.comparison-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

    .comparison-row:last-child {
        border-bottom: none;
    }

.comparison-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-values {
    font-size: 13px;
    color: var(--text-secondary);
}

.comparison-change {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

    .comparison-change.positive {
        color: #34C759;
    }

    .comparison-change.negative {
        color: #FF3B30;
    }

.comparison-icon {
    font-size: 16px;
}

.rewards-desktop-scroll::-webkit-scrollbar {
    display: none;
}

.reward-card {
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

    .reward-card:hover {
        border-color: #e32d2d;
        box-shadow: 0 6px 16px rgba(227, 45, 45, 0.25);
    }

.reward-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reward-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4) 60%, transparent);
    padding: 16px 12px 12px 12px;
    color: white;
}

/* === SKELETON LOADERS === */
.skeleton-card {
    pointer-events: none;
    user-select: none;
}

.skeleton-shimmer {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.06) 0%, 
        rgba(0, 0, 0, 0.08) 50%, 
        rgba(0, 0, 0, 0.06) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

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

.skeleton-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.skeleton-line {
    border-radius: 4px;
}

/* Skeleton specifics for shop cards */
.skeleton-card .shop-image-large {
    background: rgba(0, 0, 0, 0.06);
}

.skeleton-card .shop-image-large .skeleton-circle {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.08) 0%, 
        rgba(0, 0, 0, 0.12) 50%, 
        rgba(0, 0, 0, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

