/* ========================================
   Vera Kitabevi Sadakat Sistemi
   Beyaz & Vera Mavi Tema (v4)
   Vera Cyan  : #00AEEF
   Vera Navy  : #1A3D6E
   ======================================== */

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

/* === Design Tokens === */
:root {
    --bg-primary:     #eef4fb;
    --bg-secondary:   #ffffff;
    --bg-card:        #ffffff;
    --bg-card-hover:  #e8f3fd;
    --bg-glass:       rgba(255, 255, 255, 0.95);
    --border-glass:   rgba(0, 174, 239, 0.15);
    --border-active:  rgba(0, 174, 239, 0.55);

    --text-primary:   #1A3D6E;
    --text-secondary: #3a6090;
    --text-muted:     #7aafd4;

    /* Vera brand */
    --vera-cyan:  #00AEEF;
    --vera-navy:  #1A3D6E;
    --vera-sky:   #6dcff6;

    --gold:       #f59e0b;
    --gold-light: #fde047;
    --gold-dark:  #d97706;

    --blue:       #00AEEF;
    --blue-light: #6dcff6;
    --blue-dark:  #1A3D6E;

    --amber:   #f59e0b;
    --emerald: #059669;
    --red:     #dc2626;
    --purple:  #7c3aed;

    --gradient-gold:    linear-gradient(135deg, #f59e0b, #d97706);
    --gradient-blue:    linear-gradient(135deg, #00AEEF, #1A3D6E);
    --gradient-sky:     linear-gradient(135deg, #6dcff6, #00AEEF);
    --gradient-emerald: linear-gradient(135deg, #10b981, #059669);
    --gradient-dark:    linear-gradient(135deg, #1A3D6E, #0d2547);
    --gradient-card:    linear-gradient(135deg, #ffffff, #eef4fb);

    --gradient-bronze-card: linear-gradient(135deg, #b07c30 0%, #e8b86d 50%, #b07c30 100%);
    --gradient-silver-card: linear-gradient(135deg, #6b7d99 0%, #b8c8d9 50%, #6b7d99 100%);
    --gradient-gold-card:   linear-gradient(135deg, #c08000 0%, #f7d070 50%, #c08000 100%);

    --shadow-sm:   0 2px 8px  rgba(0, 80, 160, 0.08);
    --shadow-md:   0 6px 20px rgba(0, 80, 160, 0.13);
    --shadow-lg:   0 16px 40px rgba(0, 80, 160, 0.18);
    --shadow-gold: 0 4px 20px rgba(245, 158, 11, 0.25);
    --shadow-blue: 0 4px 20px rgba(0, 174, 239, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(at 0% 0%,    rgba(0, 174, 239, 0.08) 0, transparent 55%),
        radial-gradient(at 100% 100%, rgba(26, 61, 110, 0.06) 0, transparent 55%);
    background-attachment: fixed;
}

/* === Login Page === */
.login-container {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border: 1px solid rgba(0,174,239,0.2);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* === Forms === */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: #f0f7fe;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--vera-cyan);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.15);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input-lg {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    padding: 16px;
    letter-spacing: 1px;
    color: var(--vera-navy);
    background: #f0f7fe;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(0,174,239,0.3);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.96); }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-blue);
    color: #ffffff;
    box-shadow: var(--shadow-blue);
}
.btn-primary:hover:not(:disabled) { 
    filter: brightness(1.15);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
}

.btn-gold {
    background: var(--gradient-gold);
    color: #070913;
    box-shadow: var(--shadow-gold);
}
.btn-gold:hover:not(:disabled) { 
    filter: brightness(1.1);
    box-shadow: 0 6px 24px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: #f0f7fe;
    color: var(--vera-navy);
    border: 1px solid rgba(0,174,239,0.25);
}
.btn-secondary:hover:not(:disabled) { background: #daeffe; border-color: var(--vera-cyan); }

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.25); }

.btn-success {
    background: rgba(16,185,129,0.15);
    color: var(--emerald);
    border: 1px solid rgba(16,185,129,0.25);
}
.btn-success:hover:not(:disabled) { background: rgba(16,185,129,0.25); }

.btn-full { width: 100%; }

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-xl {
    padding: 22px;
    font-size: 1.25rem;
    border-radius: var(--radius-lg);
    min-height: 70px;
}

/* === App Layout === */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-logo {
    display: flex;
    align-items: center;
}

.app-header-logo img {
    height: 36px;
    object-fit: contain;
}

.app-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.app-content {
    flex: 1;
    padding: 20px;
    padding-bottom: 90px;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
}

/* === Bottom Nav === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active, .nav-item:hover {
    color: var(--vera-cyan);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(0,174,239,0.5)); }

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover { 
    background: var(--bg-card-hover);
    border-color: rgba(0, 174, 239, 0.25);
}

.card-gold {
    background: var(--gradient-card);
    border-color: var(--border-active);
}

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

.card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Stat Grid === */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(0, 174, 239, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover {
    background: rgba(0, 174, 239, 0.09);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--vera-cyan);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === NFC Scan Area === */
.nfc-scan-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px;
    text-align: center;
}

.nfc-icon {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f6fd, #c5e8f8);
    border: 2px solid var(--border-active);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: nfcPulse 2.5s ease-in-out infinite;
}

.nfc-icon svg { width: 52px; height: 52px; color: var(--vera-cyan); }

.nfc-scanning .nfc-icon {
    animation: nfcScan 1.2s ease-in-out infinite;
    border-color: var(--vera-cyan);
    box-shadow: var(--shadow-blue);
}

.nfc-scanning .nfc-icon svg {
    color: var(--vera-navy);
}

@keyframes nfcPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.1); }
    50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 15px 4px rgba(0, 174, 239, 0.2); }
}

@keyframes nfcScan {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.45); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 22px rgba(0, 174, 239, 0); }
}

.nfc-status {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.nfc-fallback {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
    width: 100%;
    max-width: 320px;
}

.nfc-fallback-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* === Premium Virtual Card Mockup === */
.virtual-loyalty-card {
    position: relative;
    height: 180px;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.virtual-loyalty-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 180%;
    background: linear-gradient(30deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
    transition: transform 1.5s ease-out;
    pointer-events: none;
    transform: translateX(-100%);
}
.virtual-loyalty-card:hover::after {
    transform: translateX(100%);
}

.card-bronze { background: var(--gradient-bronze-card); border: 1px solid rgba(255, 255, 255, 0.1); }
.card-silver { background: var(--gradient-silver-card); border: 1px solid rgba(255, 255, 255, 0.15); color: #1e293b; }
.card-gold { background: var(--gradient-gold-card); border: 1px solid rgba(255, 255, 255, 0.2); color: #070913; }

.virtual-loyalty-card .card-chip {
    width: 42px;
    height: 32px;
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    border-radius: 6px;
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.4);
    position: relative;
}

/* === Customer Info Card === */
.customer-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
}

.customer-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.customer-card-code {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
    letter-spacing: 1px;
}

.customer-balance {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
}

.customer-balance-value {
    font-size: 2.4rem;
    font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.customer-balance-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === Tier Badge === */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.tier-bronze { background: rgba(181, 101, 29, 0.10); color: #c27a00; border: 1px solid rgba(181, 101, 29, 0.25); }
.tier-silver { background: rgba(100, 120, 160, 0.10); color: #3a6090; border: 1px solid rgba(100, 120, 160, 0.3); }
.tier-gold   { background: rgba(245, 158, 11, 0.12); color: #c27a00; border: 1px solid rgba(245, 158, 11, 0.3); }

/* === Vertical Timeline === */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border-glass);
    margin: 10px 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}
.timeline-item:last-child {
    margin-bottom: 8px;
}

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    z-index: 2;
}

.timeline-earn .timeline-dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.timeline-redeem .timeline-dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.timeline-campaign .timeline-dot { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.timeline-refund .timeline-dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.timeline-content {
    background: #f4f9fe;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}
.timeline-content:hover {
    background: #e8f3fd;
}

.timeline-points {
    font-size: 1.1rem;
    font-weight: 700;
}
.timeline-points.positive { color: var(--emerald); }
.timeline-points.negative { color: var(--red); }

/* === Success Overlay & Sparkles === */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 17, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 24px;
    backdrop-filter: blur(8px);
}

.success-check {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gradient-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.success-check svg { width: 44px; height: 44px; color: #ffffff; }

.success-points {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gold);
    animation: countUp 0.8s ease;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.success-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-customer {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 16px;
    text-align: center;
}

.success-spin-prompt {
    margin-top: 28px;
    padding: 20px 30px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-lg);
    text-align: center;
    animation: fadeIn 0.5s ease 0.5s both;
    max-width: 320px;
}

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

/* === Visual Interactive Spin Wheel === */
.wheel-wrapper {
    position: relative;
    width: 290px;
    height: 290px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid rgba(0, 174, 239, 0.15);
    box-shadow:
        0 10px 30px rgba(0, 80, 160, 0.25),
        0 0 0 3px var(--border-glass),
        0 0 20px 4px rgba(0, 174, 239, 0.15);
    transition: transform 5s cubic-bezier(0.1, 0.8, 0.1, 1);
    transform: rotate(0deg);
}

.wheel-pin {
    position: absolute;
    top: -12px;
    width: 24px;
    height: 32px;
    background: #ef4444;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5));
    z-index: 10;
    transform: rotate(180deg);
}

.wheel-center-button {
    position: absolute;
    width: 54px;
    height: 54px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.5), 
        inset 0 2px 4px rgba(255,255,255,0.4);
    z-index: 5;
    font-size: 0.75rem;
    font-weight: 800;
    color: #070913;
    cursor: pointer;
    border: 3px solid var(--gold);
    text-transform: uppercase;
}
.wheel-center-button:active {
    transform: scale(0.95);
}

/* === Customer List === */
.customer-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.customer-list-item:hover, .customer-list-item:active {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 80, 160, 0.12);
}

.customer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-blue);
    border: 1.5px solid rgba(0,174,239,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,80,160,0.2);
}

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

.customer-list-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-list-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.customer-list-points {
    text-align: right;
    flex-shrink: 0;
}

.customer-list-balance {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
}

.customer-list-spent {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Search & Filter Controls === */
.search-bar {
    position: relative;
    margin-bottom: 12px;
}

.search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Advanced filters */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    scrollbar-width: none; /* Firefox */
}
.filter-tabs::-webkit-scrollbar { display: none; } /* Chrome, Safari */

.filter-tab {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.filter-tab:hover {
    background: rgba(255,255,255,0.08);
}
.filter-tab.active {
    background: var(--vera-cyan);
    color: #fff;
    border-color: var(--vera-cyan);
}

.sort-select-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sort-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 17, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(4px);
    padding: 10px;
}

.modal-content {
    width: 100%;
    max-width: 520px;
    max-height: 85dvh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-md) var(--radius-md);
    border: 1px solid var(--border-glass);
    padding: 24px;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.17, 0.84, 0.44, 1);
    box-shadow: var(--shadow-lg);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    margin: 0 auto 20px;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* === Numeric Pad & Presets === */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
}

.numpad-btn {
    padding: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.numpad-btn:active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--blue);
    transform: scale(0.95);
}

.numpad-btn.numpad-clear { color: var(--red); font-size: 1.1rem; }
.numpad-btn.numpad-backspace { font-size: 1.1rem; }

/* Presets panel */
.amount-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-width: 320px;
    margin: 12px auto;
}

.preset-btn {
    padding: 8px 4px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.preset-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}
.preset-btn:active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--blue);
}

/* === Toast === */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 90%;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.toast-success { background: var(--emerald); color: white; }
.toast-error { background: var(--red); color: white; }
.toast-info { background: var(--blue); color: white; }

@keyframes toastIn { from { transform: translateX(-50%) translateY(-30px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(-50%) translateY(-30px); opacity: 0; } }

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    opacity: 0.4;
}

/* === Page Transition === */
.page { animation: pageIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* === Utilities === */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-gold { color: var(--gold) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-red { color: var(--red) !important; }
.text-blue { color: var(--blue) !important; }
.text-muted { color: var(--text-muted); }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
/* === Transaction List === */
.tx-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f4f9fe;
    border: 1px solid rgba(0, 174, 239, 0.12);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.tx-item:hover {
    background: #e8f3fd;
    border-color: rgba(0, 174, 239, 0.25);
}

.tx-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0;
    flex-shrink: 0;
    color: #fff;
}

.tx-earn   .tx-icon { background: var(--emerald); }
.tx-redeem .tx-icon { background: var(--red); }
.tx-campaign .tx-icon { background: var(--vera-cyan); }
.tx-refund .tx-icon { background: var(--amber); color: #fff; }
.tx-spin   .tx-icon { background: var(--purple); }
.tx-adjust .tx-icon { background: var(--vera-navy); }

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

.tx-desc {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--vera-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.tx-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.tx-points {
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}
.tx-points.positive { color: var(--emerald); }
.tx-points.negative { color: var(--red); }

.btn-refund {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-refund:hover {
    background: rgba(245, 158, 11, 0.22);
}


/* === Lookup Tabs (Kart/Telefon arama) === */
.lookup-tabs {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding-top: 4px;
}

.lookup-tab-btns {
    display: flex;
    background: #eef4fb;
    border-radius: 30px;
    padding: 4px;
    margin-bottom: 14px;
    gap: 4px;
}

.lookup-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.lookup-tab-btn.active {
    background: #ffffff;
    color: var(--vera-navy);
    box-shadow: 0 2px 8px rgba(0, 80, 160, 0.12);
}

.lookup-tab-btn svg {
    flex-shrink: 0;
}

.lookup-tab-pane {
    animation: fadeIn 0.2s ease;
}

.lookup-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lookup-form .form-input {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.lookup-search-btn {
    padding: 12px 18px !important;
    border-radius: var(--radius-md) !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* === Responsive === */
@media (min-width: 768px) {
    .app-content { padding: 24px; padding-bottom: 90px; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Print styles */
@media print {
    .bottom-nav, .app-header, .btn { display: none !important; }
    body { background: #fff; color: #000; background-image: none; }
    .card { border: 1px solid #ddd; background: #fff; box-shadow: none; backdrop-filter: none; }
}

/* === Spin Wheel === */
.wheel-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.wheel-canvas {
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.3), 0 0 60px rgba(251, 191, 36, 0.1);
    border: 3px solid rgba(251, 191, 36, 0.4);
    cursor: pointer;
    transform-origin: center center;
}

.wheel-pin {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 26px solid var(--gold);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.wheel-center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: #070913;
    font-weight: 800;
    font-size: 0.75rem;
    font-family: var(--font);
    border: 3px solid rgba(255,255,255,0.3);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(251,191,36,0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 10;
    letter-spacing: 0.04em;
}

.wheel-center-button:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 28px rgba(251,191,36,0.7);
}

.wheel-center-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Success Overlay === */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 17, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    text-align: center;
    padding: 24px;
    animation: fadeIn 0.35s ease;
}

.success-check {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: bounceIn 0.5s cubic-bezier(0.17, 0.84, 0.44, 1);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
}
.success-check svg { width: 48px; height: 48px; stroke: white; }

.success-points {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: countUp 0.5s ease 0.3s both;
}

.success-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 8px;
    margin-bottom: 8px;
}

.success-customer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.success-spin-prompt {
    margin-top: 20px;
    padding: 20px;
    background: rgba(251, 191, 36, 0.07);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-lg);
    max-width: 320px;
    width: 100%;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* amount variable fix in showCustomerPanel */
