

/* ========================================
   MARAGHI HUB - UNIFIED STYLES
   ======================================== */

/* CSS Custom Properties for Theme Colors */
:root {
    --text-muted: rgba(0, 0, 0, 0.6);
    --text-primary: #333;
    --text-secondary: #666;
    --color-success: #16a34a;
    --color-warning: #ea580c;
    --smart-bg: rgba(102, 126, 234, 0.15);
    --smart-border: rgba(102, 126, 234, 0.3);
}

body.dark-mode {
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-primary: #fff;
    --text-secondary: #aaa;
    --color-success: #4ade80;
    --color-warning: #fb923c;
    --smart-bg: rgba(102, 126, 234, 0.25);
    --smart-border: rgba(102, 126, 234, 0.4);
}

/* GLOBAL RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 60px;
}

/* PAGE-SPECIFIC BACKGROUNDS */
body.login-page,
body.pin-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.locked-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SHARED FULL-PAGE CONTAINER */
.login-container,
.locked-container,
.pin-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
}

.pin-container {
    position: relative;
    z-index: 1;
}

input, select, textarea {
    font-size: 16px !important; /* Prevent iOS zoom */
}

/* ANIMATED BACKGROUND BUBBLES */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    animation: float 20s infinite ease-in-out;
}

.bubble:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-duration: 25s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 120px; height: 120px; left: 25%; animation-duration: 30s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 60px; height: 60px; left: 45%; animation-duration: 22s; animation-delay: 4s; }
.bubble:nth-child(4) { width: 100px; height: 100px; left: 65%; animation-duration: 28s; animation-delay: 1s; }
.bubble:nth-child(5) { width: 70px; height: 70px; left: 80%; animation-duration: 26s; animation-delay: 3s; }
.bubble:nth-child(6) { width: 90px; height: 90px; left: 35%; animation-duration: 24s; animation-delay: 5s; }

@keyframes float {
    0%, 100% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    50% { transform: translateY(-20vh) translateX(50px) rotate(180deg); opacity: 0.5; }
    90% { opacity: 0.3; }
}

/* COMMON HEADER */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 10px;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.nav a:active {
    transform: scale(0.95);
}

.nav svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Download Report Button Styling */
.download-report-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    font-weight: 600 !important;
}

.download-report-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.download-report-btn svg {
    width: 20px;
    height: 20px;
}

/* CONTAINER */
.container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
    50% { text-shadow: 0 0 30px rgba(102, 126, 234, 0.8), 0 0 40px rgba(118, 75, 162, 0.6); }
}

/* SHARED AUTH BOXES */
.login-box,
.locked-box {
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(102,126,234,0.2);
    padding: 40px 32px 32px 32px;
    max-width: 400px;
    width: 90vw;
    text-align: center;
    animation: slideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.login-icon {
    display: none;
}

.login-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.25));
    transition: transform 0.3s ease;
}

.login-icon:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.glow-text {
    animation: glow-pulse 2s ease-in-out infinite;
}

.login-box h1,
.locked-box h1 {
    font-size: 2.1rem;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.login-box h1 {
    color: #16213e;
}

.locked-box h1 {
    color: #764ba2;
}

.login-box p,
.locked-box p {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.info-text {
    color: #666;
    font-size: 0.98rem;
    margin-top: 18px;
    opacity: 0.85;
}

/* COMMON ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes rise {
    0% { bottom: -100px; transform: translateX(0); opacity: 0; }
    50% { opacity: 1; }
    100% { bottom: 110%; transform: translateX(200px); opacity: 0; }
}

@keyframes moveBackground {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5%, 5%); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Animation Classes */
.interactive-card {
    transition: all 0.3s ease;
}

.slide-up {
    animation: slideIn 0.6s ease;
}

.slide-right {
    animation: slideIn 0.8s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 2s steps(30) 0.5s forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.bounce-in {
    animation: bounce-in 0.8s ease;
}

.animated-title {
    display: inline-block;
}

.glow-text {
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.animated-form {
    animation: fadeIn 0.5s ease;
}

.floating-label {
    position: relative;
}

.interactive-input {
    transition: all 0.3s ease;
}

.counter {
    display: inline-block;
}

/* ========================================
   PIN PAGE STYLES
   ======================================== */
/* ========================================
   LOGIN PAGE STYLES
   ======================================== */
.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.18);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 18px;
    margin-bottom: 10px;
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0 0 0;
    justify-items: center;
}

.numpad-btn {
    width: 60px;
    height: 48px;
    font-size: 1.3rem;
    border: none;
    border-radius: 8px;
    background: #e0e7ff;
    color: #16213e;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.numpad-btn:hover {
    background: #c7d2fe;
    color: #764ba2;
}

/* ========================================
   LOCKED PAGE STYLES
   ======================================== */
.support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    border-radius: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
    transition: all 0.3s ease;
}

.support-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.support-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

.support-link:active {
    transform: scale(0.98);
}

.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.lock-icon svg {
    width: 40px;
    height: 40px;
}

/* ========================================
   PIN PAGE STYLES
   ======================================== */

.pin-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 60px 50px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: fadeIn 0.5s ease-out;
}

.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.lock-icon svg {
    width: 45px;
    height: 45px;
    fill: white;
}

.pin-title {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.pin-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 40px;
}

.pin-input-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px auto;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow: visible;
}

.pin-digit {
    width: 55px;
    height: 65px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.95);
    color: #16213e;
    border-radius: 16px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    caret-color: transparent;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.pin-digit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

.pin-digit:hover::before {
    left: 100%;
}

.pin-digit:focus {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.3), 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: scale(1.05) translateY(-2px);
}

.pin-digit.filled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

.error-message {
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 20px;
    font-weight: 500;
    animation: shake 0.5s;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ========================================
   SERVICES PAGE STYLES
   ======================================== */
body.services-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

body.services-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    animation: moveBackground 20s ease-in-out infinite;
    z-index: 0;
}

body.services-page .login-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 28px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.services-header {
    margin-bottom: 40px;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.25));
}

body.services-page .welcome-text {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    opacity: 0;
    animation: fadeIn 0.4s ease 0.1s forwards;
}

body.services-page h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    margin-top: 0;
    opacity: 0;
    animation: slideIn 0.4s ease 0.2s forwards;
}

body.services-page .subtitle {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 0;
    display: block;
    opacity: 0;
    animation: fadeIn 0.4s ease 0.3s forwards;
}

body.services-page .login-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

body.services-page .login-option {
    padding: 25px 20px;
    background: linear-gradient(145deg, #f8faff 0%, #f1f5ff 100%);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    width: 100%;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: slideIn 0.4s ease forwards;
}

body.services-page .login-option:nth-child(1) {
    animation-delay: 0.4s;
}

body.services-page .login-option:nth-child(2) {
    animation-delay: 0.5s;
}

body.services-page .login-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

body.services-page .login-option:hover::before {
    left: 100%;
}

body.services-page .login-option:hover {
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

body.services-page .login-option:active {
    transform: translateY(-4px) scale(1.01);
}

body.services-page .option-icon {
    font-size: 42px;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.2));
}

body.services-page .login-option h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2d3748;
    position: relative;
    z-index: 1;
}

body.services-page .login-option p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 18px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

body.services-page .option-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.services-page .option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.logout-section {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    opacity: 0;
    animation: fadeIn 0.4s ease 0.6s forwards;
    width: 100%;
    text-align: center;
}

.logout-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.logout-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.logout-link:hover {
    color: #667eea;
}

.logout-link:hover::after {
    width: 100%;
}

.login-option h3 {
    color: #2d3748;
    font-size: 18px;
    margin-bottom: 8px;
}

.login-option p {
    color: #718096;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.option-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.option-btn:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.option-btn:active {
    transform: translateY(0);
}

.logout-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.logout-link {
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
}

.logout-link:hover {
    color: #667eea;
    background: #f0f2f5;
}

/* Services Page Top Controls */
.services-top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.dark-mode-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode-pill:hover {
    background: rgba(255, 255, 255, 0.25);
}

.dark-mode-pill svg {
    fill: rgba(255, 255, 255, 0.9);
}

.dark-mode-pill input {
    display: none;
}

.dark-pill-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: 0.3s;
}

.dark-pill-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark-mode-pill input:checked + .dark-pill-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark-mode-pill input:checked + .dark-pill-slider:before {
    transform: translateX(16px);
}

.logout-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-icon-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.4);
    transform: scale(1.05);
}

.logout-icon-btn svg {
    fill: currentColor;
}

/* Dark mode adjustments for top controls */
body.dark-mode .dark-mode-pill {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .dark-mode-pill:hover {
    background: rgba(102, 126, 234, 0.3);
}

body.dark-mode .logout-icon-btn {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .logout-icon-btn:hover {
    background: rgba(255, 100, 100, 0.25);
    border-color: rgba(255, 100, 100, 0.4);
}

/* ========================================
   APP PAGES (Calculator, History, Schema, Rolex)
   ======================================== */
body.app-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-bottom: 80px;
}

body.app-page.dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

body.app-page.dark .header {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f35 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.app-page.dark .month-label {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.month-label {
    text-align: center;
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.total-cashback-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    margin-bottom: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.total-cashback-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.total-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.total-value {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Input Section */
.input-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.input-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.card-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.card-button {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card-button:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.card-button.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.card-button img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.card-button .card-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Smart Recommendation */
.smart-recommendation {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: none;
}

.smart-recommendation.show {
    display: block;
}

.smart-recommendation.capped {
    background: linear-gradient(135deg, #ff475715 0%, #ff383815 100%);
    border-color: #ff4757;
}

.smart-recommendation h3 {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 8px;
}

.smart-recommendation.capped h3 {
    color: #ff4757;
}

.smart-recommendation .card-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

/* Smart Recommendation Content Classes */
.smart-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.smart-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.smart-divider {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.smart-highlight-box {
    margin-top: 8px;
    padding: 10px;
    background: var(--smart-bg);
    border-radius: 8px;
    border: 1px solid var(--smart-border);
}

.smart-cashback {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-success);
    margin-top: 2px;
}

.smart-points {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-warning);
    margin-top: 4px;
}

/* Amount Input */
.amount-input-container {
    margin-top: 20px;
}

#amountAndSave {
    display: none;
}

.amount-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.amount-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.amount-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Suggested Amount Buttons */
.btn-suggested-amount {
    padding: 10px 16px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-suggested-amount:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-suggested-amount:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

body.dark-mode .btn-suggested-amount {
    background: #2d2d2d;
    border-color: #667eea;
    color: #667eea;
}

body.dark-mode .btn-suggested-amount:hover {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* Beyon cards 2-column layout on desktop */
@media (min-width: 769px) {
    #beyon .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card-stat {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card-stat:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-stat.capped {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.card-stat.capped:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.card-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-bank-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.card-stat .card-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}


.cap-badge {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.cap-reached {
        background: #ff4757;
        color: white;
}

.manual-cap {
    background: #ff4757;
    color: white;
}

@keyframes pulse-cap {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Manual Cap/Uncap Buttons */
.btn-cap, .btn-uncap {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-cap {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    border-radius: 50px;
}

.btn-cap:hover {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}

.btn-cap:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.btn-uncap {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.btn-uncap:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.btn-uncap:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.manual-cap-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
    .cap-badge {
        font-size: 9px;
        padding: 3px 6px;
        border-radius: 6px;
    }
    
    .btn-cap, .btn-uncap {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 12px;
        min-height: 48px;
    }
    
    .manual-cap-section {
        margin-top: 14px;
        padding-top: 14px;
    }
}

.cvv-badge {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-row:last-of-type {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.stat-highlight {
    color: #667eea;
}

/* Progress Timeline */
.progress-timeline {
    margin-top: 16px;
}

.timeline-track {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.timeline-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* Bank Sections */
.bank-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.bank-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bank-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
}

.bank-logo-large {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

.dropdown-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.bank-header.active .dropdown-arrow {
    transform: rotate(90deg);
}

.bank-content {
    padding: 20px;
    display: none;
    animation: slideIn 0.3s ease;
}

.bank-content.show {
    display: block;
}

/* History Page */
.payment-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.payment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.payment-info {
    flex: 1;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bank-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.payment-header .card-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.payment-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.payment-details .amount {
    font-weight: 700;
    color: #333;
}

.delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #ff3838;
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #666;
}

/* Rolex/Savings Page */
.logout-container {
    text-align: right;
    margin-bottom: 20px;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.goal-showcase {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    text-align: center;
}

.watch-details {
    animation: fadeIn 0.6s ease;
}

.watch-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.watch-image {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
    animation: floatWatch 3s ease-in-out infinite;
}

@keyframes floatWatch {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.watch-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 4px;
    color: #c9a227;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.crown-icon {
    color: #c9a227;
}

.watch-name {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.watch-ref {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ref-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
}

.ref-number {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 2px;
}

.watch-bezel-colors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.bezel-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.bezel-dot.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.bezel-dot.black {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.bezel-nickname {
    font-size: 13px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 4px;
}

.watch-price {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.progress-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.progress-container {
    margin-bottom: 20px;
}

.milestone-progress {
    position: relative;
    padding: 60px 0 40px;
}

.milestone-bar {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: visible;
}

.milestone-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 1s ease;
}

.milestone-marker {
    position: absolute;
    top: -1px;
    width: 80px;
}

.milestone-marker.start { 
    left: 0;
    transform: translateX(0);
}

.milestone-marker.mid { 
    left: 50%;
    transform: translateX(-50%);
}

.milestone-marker.end { 
    right: 0;
    left: auto;
    transform: translateX(0);
}

.marker-dot {
    width: 14px;
    height: 14px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 6px;
}

.marker-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    text-align: center;
    font-weight: 600;
    margin-top: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
}

.milestone-current {
    position: absolute;
    top: -6px;
    left: 0;
    transform: translateX(-50%);
    min-width: 100px;
    z-index: 10;
}

.current-marker {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid white;
    border-radius: 50%;
    margin: 0 auto;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    cursor: pointer;
}

.current-label {
    display: none !important; /* Hidden - stats below show the same info */
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.current-marker:hover + .current-label {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.current-amount {
    font-size: 14px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.current-percent {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-item .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: block;
}

.stat-item .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    display: inline-block;
}

.stat-item .stat-unit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 4px;
    display: inline-block;
}

.add-savings-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.add-savings-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
}

.form-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Perfect 2x2 grid layout */
.form-grid .form-group {
    width: 100%;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.form-input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* Select dropdown styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

select.form-input option {
    background: #16213e;
    color: white;
    padding: 10px;
}

select.form-input option:disabled {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-underline {
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.form-group.focused .input-underline {
    transform: scaleX(1);
}

.btn-save {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-save:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple.active {
    animation: ripple-effect 0.6s ease-out;
}

@keyframes ripple-effect {
    to {
        transform: scale(20);
        opacity: 0;
    }
}

/* Timeline */
.timeline-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.timeline-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.timeline-months {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 650px;
    overflow-y: auto;
    overflow-x: visible;
    padding: 4px 8px 4px 4px;
}

/* Scrollbar styling for timeline */
.timeline-months::-webkit-scrollbar {
    width: 6px;
}

.timeline-months::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.timeline-months::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.timeline-months::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.month-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: visible;
    min-width: 0;
}

.month-section.current-month {
    border: 2px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.month-section.future-month {
    opacity: 0.6;
}

.month-section.future-month .month-name {
    color: rgba(255, 255, 255, 0.6);
}

.month-header {
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.month-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.month-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.month-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.month-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.month-arrow {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.month-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.month-content.show {
    max-height: 2000px;
    overflow: visible;
}

.month-deposits {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.month-deposit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.month-deposit-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.deposit-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.deposit-cat {
    font-size: 15px;
    font-weight: 600;
    color: white;
    word-break: break-word;
}

.deposit-note-small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
    word-break: break-word;
}

.deposit-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.deposit-amt {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    white-space: nowrap;
}

.month-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-top: 8px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    color: white;
}

.total-amt {
    font-size: 16px;
    color: #667eea;
}

.no-deposits {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Installment Forms */
.add-deposit-form {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 12px;
}

.add-deposit-form h4 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    font-weight: 600;
}

.installment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-input {
    padding: 8px !important;
    cursor: pointer;
}

.file-input::-webkit-file-upload-button {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.file-input::-webkit-file-upload-button:hover {
    background: rgba(102, 126, 234, 0.3);
}

.deposit-file {
    margin-top: 8px;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.file-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

.download-receipt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white;
    background: #667eea;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.download-receipt-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.download-receipt-btn svg {
    flex-shrink: 0;
}

.no-file {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.month-deposit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.delete-btn {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.delete-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
    transform: scale(1.1);
}

.pulse-effect {
    animation: pulse 0.6s ease;
}

.magnetic-btn {
    transition: transform 0.2s ease;
}

/* Scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */
/* ========================================
   DESKTOP STYLES (769px and above)
   ======================================== */
@media (min-width: 769px) {
    /* Login Page Desktop Layout */
    .login-container {
        padding: 0;
        max-width: 480px;
        width: auto;
    }
    
    .login-box {
        max-width: 480px;
        padding: 50px 45px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 25px 80px rgba(102, 126, 234, 0.25);
        position: relative;
        overflow: hidden;
    }
    
    .login-box::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border-radius: 26px;
        z-index: -1;
        animation: glow-border 3s ease-in-out infinite;
    }
    
    @keyframes glow-border {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 0.6; }
    }
    
    .login-icon {
        display: none;
    }
    
    .login-icon svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.3));
    }
    
    .login-box h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .login-box p {
        font-size: 1.1rem;
        margin-bottom: 35px;
        color: #64748b;
    }
    
    .pin-input-group {
        gap: 16px;
        margin: 35px 0;
        justify-content: center;
    }
    
    .pin-digit {
        width: 58px;
        height: 68px;
        font-size: 28px;
        border-radius: 16px;
        border: 3px solid rgba(102, 126, 234, 0.2);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .pin-digit:focus {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.08);
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
        transform: scale(1.05) translateY(-5px);
    }
    
    .pin-digit.filled {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: #667eea;
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
        transform: scale(1.02);
    }
    
    /* Services Page Desktop Layout */
    body.services-page .login-container {
        padding: 45px 40px;
        max-width: 580px;
        min-height: auto;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .services-header {
        margin-bottom: 40px;
        text-align: center;
        width: 100%;
    }
    
    .service-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 20px;
    }
    
    body.services-page h1 {
        font-size: 32px;
        margin-bottom: 12px;
        text-align: center;
    }
    
    body.services-page .welcome-text {
        font-size: 18px;
        margin-bottom: 8px;
        text-align: center;
    }
    
    body.services-page .subtitle {
        font-size: 15px;
        margin-bottom: 0;
        text-align: center;
    }
    
    body.services-page .login-options {
        display: flex;
        flex-direction: row;
        gap: 25px;
        margin-top: 35px;
        width: 100%;
        justify-content: space-between;
    }
    
    body.services-page .login-option {
        flex: 1;
        padding: 28px 20px;
        min-height: 200px;
        max-width: 240px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        text-align: center;
    }
    
    body.services-page .option-icon {
        font-size: 42px;
        margin-bottom: 16px;
    }
    
    body.services-page .login-option h3 {
        font-size: 20px;
        margin-bottom: 10px;
        text-align: center;
    }
    
    body.services-page .login-option p {
        font-size: 14px;
        margin-bottom: 20px;
        text-align: center;
        line-height: 1.4;
    }
    
    body.services-page .option-btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
    }
    
    .login-option p {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .option-btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    /* Locked Page Desktop Layout */
    .locked-box {
        max-width: 500px;
        padding: 50px 40px;
    }
    
    .locked-box h1 {
        font-size: 2.5rem;
    }
    
    .support-link {
        font-size: 18px;
        padding: 12px 24px;
    }
}

/* ========================================
   RESPONSIVE MOBILE STYLES
   ======================================== */

/* Tablet and Mobile (768px and below) */
@media (max-width: 768px) {
    /* Header Adjustments */
    .header {
        padding: 10px 12px;
    }
    
    .header h1 {
        font-size: 16px;
    }
    
    .nav {
        gap: 4px;
    }
    
    .nav a {
        padding: 5px 8px;
        font-size: 11px;
        gap: 3px;
    }
    
    .nav a svg {
        width: 14px;
        height: 14px;
    }
    
    /* Container */
    .container {
        padding: 10px;
    }
    
    /* Month Label */
    .month-label {
        font-size: 12px;
        padding: 5px 10px;
        margin-bottom: 8px;
    }
    
    /* Total Cashback Card */
    .total-cashback-card {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .total-label {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .total-value {
        font-size: 20px;
    }
    
    /* Input Section */
    .input-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .input-section h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Card Buttons Grid */
    .card-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .card-button {
        padding: 10px;
    }
    
    .card-button img {
        width: 30px;
        height: 30px;
    }
    
    .card-button .card-name {
        font-size: 11px;
    }
    
    /* Smart Recommendation */
    .smart-recommendation {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .smart-recommendation h3 {
        font-size: 13px;
    }
    
    .smart-recommendation .card-name {
        font-size: 14px;
    }
    
    /* Amount Input */
    .amount-label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .amount-input {
        padding: 10px;
        font-size: 16px !important;
        height: 44px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* PIN Page */
    .pin-container {
        padding: 24px 16px;
        max-width: 100%;
    }
    
    .pin-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .pin-digit {
        width: 42px;
        height: 50px;
        font-size: 20px;
    }
    
    .pin-input-group {
        gap: 6px;
    }
    
    /* Services Page Mobile - Compact Card with Background Visible */
    body.services-page {
        padding: 15px 12px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    body.services-page .login-container {
        padding: 15px 15px 8px !important;
        max-width: 90%;
        width: 90%;
        text-align: center;
        display: block;
        border-radius: 20px;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Welcome - Close to services */
    body.services-page .services-header {
        margin-bottom: 4px !important;
    }
    
    body.services-page .welcome-text {
        font-size: 12px;
        margin-bottom: 0;
        font-weight: 600;
        color: #667eea;
        opacity: 1;
        animation: none;
    }
    
    body.services-page h1 {
        font-size: 22px;
        margin-bottom: 2px;
        line-height: 1;
        opacity: 1;
        animation: none;
    }
    
    body.services-page .subtitle {
        font-size: 11px;
        margin-bottom: 0;
        line-height: 1.2;
        color: #64748b;
        opacity: 1;
        animation: none;
    }
    
    /* Services - Compact */
    body.services-page .login-options {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    body.services-page .login-option {
        width: 100%;
        padding: 8px 12px;
        background: linear-gradient(145deg, #f8faff 0%, #f1f5ff 100%);
        border-radius: 12px;
        border: 1px solid rgba(102, 126, 234, 0.1);
        text-align: center;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
        opacity: 1;
        animation: none;
    }
    
    body.services-page .login-option:active {
        transform: scale(0.98);
    }
    
    body.services-page .option-icon {
        font-size: 22px;
        margin-bottom: 2px;
        display: block;
        line-height: 1;
    }
    
    body.services-page .login-option h3 {
        font-size: 14px;
        margin-bottom: 2px;
        font-weight: 700;
        color: #2d3748;
    }
    
    body.services-page .login-option p {
        font-size: 10px;
        margin-bottom: 6px;
        line-height: 1.2;
        color: #64748b;
    }
    
    body.services-page .option-btn {
        padding: 6px 16px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-radius: 8px;
    }
    
    /* Logout - Close to services */
    body.services-page .logout-section {
        margin-top: 4px;
        padding-top: 4px;
        padding-bottom: 0;
        border-top: 1px solid rgba(102, 126, 234, 0.1);
        opacity: 1;
        animation: none;
        width: 100%;
        text-align: center;
    }
    
    body.services-page .logout-link {
        color: #64748b;
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        padding: 6px 10px;
        display: inline-block;
    }
    
    .login-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .login-option {
        padding: 14px 12px;
    }
    
    .option-icon {
        font-size: 30px;
        margin-bottom: 8px;
    }
    
    .login-option h3 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .login-option p {
        font-size: 11px;
    }
    
    /* Schema Page */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card-stat {
        padding: 16px;
    }
    
    .bank-section {
        margin-bottom: 10px;
    }
    
    .bank-header {
        padding: 10px 12px;
    }
    
    .bank-logo {
        width: 24px;
        height: 24px;
    }
    
    .bank-name {
        font-size: 14px;
    }
    
    .bank-stats {
        font-size: 10px;
    }
    
    .toggle-arrow {
        font-size: 14px;
    }
    
    .bank-content {
        padding: 10px 12px;
    }
    
    .card-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .card-info h3 {
        font-size: 13px;
    }
    
    .card-stats {
        font-size: 10px;
    }
    
    .card-progress {
        height: 5px;
    }
    
    /* Rolex/Savings Page */
    .savings-header h1 {
        font-size: 18px;
    }
    
    .savings-header .subtitle {
        font-size: 12px;
    }
    
    .progress-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .progress-header h2 {
        font-size: 14px;
    }
    
    .progress-stats {
        font-size: 11px;
    }
    
    .milestone-label {
        font-size: 9px;
    }
    
    .current-label {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .form-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .form-section h2 {
        font-size: 14px;
    }
    
    .add-savings-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .form-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .form-row {
        gap: 6px;
    }
    
    .form-group label {
        font-size: 11px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-save {
        padding: 12px;
        font-size: 14px;
        margin-top: 6px;
    }
    
    /* Timeline */
    .timeline-section {
        padding: 12px;
    }
    
    .timeline-section h2 {
        font-size: 14px;
    }
    
    .timeline-card {
        padding: 10px;
    }
    
    .month-header {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .month-info {
        gap: 8px;
    }
    
    .month-name {
        font-size: 14px;
    }
    
    .month-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .month-arrow {
        font-size: 12px;
    }
    
    .deposit-item {
        padding: 8px;
        font-size: 11px;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        right: 12px;
        bottom: 12px;
    }
}

/* Small Mobile (428px and below) */
@media (max-width: 428px) {
    .header h1 {
        font-size: 14px;
    }
    
    .nav a span {
        display: none;
    }
    
    .card-stat {
        padding: 12px;
    }
    
    .card-stat-header {
        margin-bottom: 12px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .card-buttons-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .card-button {
        padding: 8px;
    }
    
    .total-value {
        font-size: 18px;
    }
    
    .pin-digit {
        width: 38px;
        height: 48px;
        font-size: 18px;
    }
    
    .container {
        padding: 8px;
    }
}

/* Extra Small Mobile (375px and below) */
@media (max-width: 375px) {
    .header h1 {
        font-size: 13px;
    }
    
    .nav a {
        padding: 5px 6px;
        font-size: 10px;
    }
    
    .total-value {
        font-size: 16px;
    }
    
    .login-container {
        padding: 18px 14px;
    }
    
    h1 {
        font-size: 16px;
    }
    
    .option-icon {
        font-size: 26px;
    }
    
    .card-button img {
        width: 26px;
        height: 26px;
    }
    
    .card-button .card-name {
        font-size: 10px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 12px 16px;
    }
    
    .login-container {
        padding: 24px 20px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 4px;
    }
    
    .subtitle {
        margin-bottom: 16px;
    }
    
    .login-options {
        flex-direction: row;
    }
    
    .login-option {
        padding: 16px 12px;
    }
    
    .option-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .login-option p {
        display: none;
    }
}

/* ACCOUNT FILTER BUTTONS */
.filter-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 10px;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 16px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #1a1a2e;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-btn:hover::before {
    opacity: 1;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    color: white;
}

.filter-btn .bank-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.filter-btn span {
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .filter-container {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        padding: 16px 20px;
    }
}

/* ========================================
   DANGER AREA SECTION
   ======================================== */

.danger-area {
    margin-top: 40px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(139, 0, 0, 0.15) 100%);
    border: 2px solid #dc3545;
    border-radius: 16px;
    text-align: center;
}

.danger-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #dc3545;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.danger-header svg {
    fill: #dc3545;
}

/* Danger Zone - Unified Red Design */
.danger-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.danger-section {
    background: rgba(220, 53, 69, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
}

.danger-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
}

.danger-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.danger-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #8b0000;
}

.danger-section-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-danger-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
}

.btn-danger-action:hover {
    transform: translateY(-2px);
}

.btn-danger-action:active {
    transform: translateY(0);
}

/* Beyon Button - Red */
.btn-beyon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.35);
}

.btn-beyon:hover {
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.5);
}

/* Al Salam Button - Red */
.btn-alsalam {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.35);
}

.btn-alsalam:hover {
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .danger-sections {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .danger-section {
        padding: 16px;
    }
    
    .danger-section-title {
        font-size: 16px;
    }
    
    .danger-section-desc {
        font-size: 12px;
    }
    
    .btn-danger-action {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .alsalam-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .danger-section {
        padding: 14px;
    }
    
    .danger-section-icon {
        font-size: 20px;
    }
    
    .danger-section-title {
        font-size: 15px;
    }
}

.btn-reset-all {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-reset-all:hover {
    background: linear-gradient(135deg, #e04555 0%, #bb2d3b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

.btn-reset-all:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.4);
}

/* ========================================
   SETTINGS MODAL
   ======================================== */

.settings-icon svg {
    fill: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
}

.settings-icon:hover svg {
    fill: #ffffff;
    transform: rotate(45deg);
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.settings-overlay.show .settings-modal {
    transform: scale(1) translateY(0);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.settings-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.settings-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.settings-close:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.settings-content {
    padding: 24px;
}

.settings-content .danger-area {
    margin-top: 0;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.setting-label svg {
    fill: #667eea;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

@media (max-width: 480px) {
    .settings-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .settings-header {
        padding: 16px 20px;
    }
    
    .settings-header h2 {
        font-size: 18px;
    }
    
    .settings-content {
        padding: 16px;
    }
    
    .settings-section {
        margin-bottom: 20px;
    }
    
    .setting-item {
        padding: 14px;
    }
    
    .setting-label {
        font-size: 14px;
    }
}

/* ========================================
   DARK MODE STYLES
   ======================================== */

body.dark-mode {
    background: #1a1a2e;
}

body.dark-mode .animated-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.dark-mode .header {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f35 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .container {
    background: rgba(30, 30, 50, 0.95);
}

body.dark-mode .month-label {
    background: rgba(102, 126, 234, 0.2);
    color: #a8b4ff;
}

body.dark-mode .total-cashback-card {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f35 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .total-label {
    color: #aaa;
}

body.dark-mode .breakdown-card {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
    border-color: rgba(102, 126, 234, 0.15);
}

body.dark-mode .breakdown-label {
    color: #888;
}

body.dark-mode .input-section {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .input-section h2 {
    color: #fff;
}

body.dark-mode .card-button {
    background: linear-gradient(145deg, #2d2d44 0%, #252540 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .card-button .card-name {
    color: #ddd;
}

body.dark-mode .card-button.selected {
    border-color: #667eea;
    background: linear-gradient(145deg, #3d3d5c 0%, #2d2d44 100%);
}

body.dark-mode .smart-recommendation {
    background: linear-gradient(145deg, #2d2d44 0%, #252540 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

body.dark-mode .smart-recommendation .card-name {
    color: #fff;
}

body.dark-mode .smart-recommendation h3 {
    color: #a8b4ff;
}

body.dark-mode .smart-recommendation.capped {
    background: linear-gradient(145deg, #3d2d35 0%, #2d2530 100%);
    border-color: rgba(255, 71, 87, 0.4);
}

body.dark-mode .smart-recommendation.capped h3,
body.dark-mode .smart-recommendation.capped div {
    color: #ff8a94 !important;
}

body.dark-mode .amount-label {
    color: #ddd;
}

body.dark-mode .amount-input {
    background: #1a1a2e;
    border-color: rgba(102, 126, 234, 0.3);
    color: #fff;
}

body.dark-mode .amount-input::placeholder {
    color: #666;
}

body.dark-mode .amount-input:focus {
    border-color: #667eea;
}

body.dark-mode .btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Settings Modal Dark Mode */
body.dark-mode .settings-modal {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
}

body.dark-mode .settings-header {
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .settings-header h2 {
    color: #fff;
}

body.dark-mode .settings-close {
    background: rgba(102, 126, 234, 0.15);
    color: #aaa;
}

body.dark-mode .settings-close:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

body.dark-mode .settings-section-title {
    color: #888;
}

body.dark-mode .setting-item {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.15);
}

body.dark-mode .setting-label {
    color: #ddd;
}

body.dark-mode .danger-area {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(139, 0, 0, 0.2) 100%);
}

body.dark-mode .danger-section {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.25);
}

body.dark-mode .danger-section-title {
    color: #ff6b6b;
}

/* Bank sections in dark mode */
body.dark-mode .bank-section {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .bank-header {
    color: #fff;
}

body.dark-mode .bank-title span {
    color: #fff;
}

body.dark-mode .card-stat {
    background: linear-gradient(145deg, #2d2d44 0%, #252540 100%);
    border-color: rgba(102, 126, 234, 0.15);
}

body.dark-mode .card-name {
    color: #ddd;
}

body.dark-mode .stat-label {
    color: #888;
}

body.dark-mode .stat-value {
    color: #ddd;
}

body.dark-mode .timeline-track {
    background: rgba(102, 126, 234, 0.2);
}

body.dark-mode .timeline-labels span {
    color: #888;
}

/* History page dark mode */
body.dark-mode .history-item {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
    border-color: rgba(102, 126, 234, 0.15);
}

body.dark-mode .history-card-name {
    color: #ddd;
}

body.dark-mode .history-date {
    color: #888;
}

/* Payment items dark mode (History page) */
body.dark-mode .payment-item {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .payment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .payment-header .card-name {
    color: #fff;
}

body.dark-mode .payment-details {
    color: #aaa;
}

body.dark-mode .payment-details .amount {
    color: #fff;
}

body.dark-mode .payment-details .timestamp {
    color: #888;
}

body.dark-mode .payment-details .cashback {
    color: #4ade80 !important;
}

body.dark-mode .filter-container .filter-btn {
    background: linear-gradient(145deg, #2d2d44 0%, #252540 100%);
    border-color: rgba(102, 126, 234, 0.2);
    color: #ddd;
}

body.dark-mode .filter-container .filter-btn:hover {
    border-color: rgba(102, 126, 234, 0.4);
}

body.dark-mode .filter-container .filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

body.dark-mode .empty-state {
    color: #888;
}

body.dark-mode .empty-state h2 {
    color: #aaa;
}

/* Footer dark mode */
body.dark-mode .site-footer {
    background: linear-gradient(135deg, #2d2d44 0%, #1f1f35 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .footer-brand {
    color: #a8b4ff;
}

body.dark-mode .footer-copy {
    color: #888;
}

body.dark-mode .footer-divider {
    color: #555;
}

/* Services page dark mode */
body.dark-mode.services-page {
    background: #1a1a2e;
}

body.dark-mode.services-page::before {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.dark-mode.services-page .login-container {
    background: linear-gradient(145deg, #2a2a40 0%, #1f1f35 100%);
}

body.dark-mode.services-page .welcome-text,
body.dark-mode.services-page h1 {
    color: #fff;
}

body.dark-mode.services-page .subtitle {
    color: #aaa;
}

body.dark-mode.services-page .login-option {
    background: linear-gradient(145deg, #2d2d44 0%, #252540 100%);
}

body.dark-mode.services-page .login-option h3 {
    color: #fff;
}

body.dark-mode.services-page .login-option p {
    color: #888;
}

/* ========================================
   CASHBACK BREAKDOWN CARDS
   ======================================== */

.cashback-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.breakdown-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.breakdown-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.breakdown-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 6px;
}

.breakdown-label {
    font-size: 10px;
    color: #888;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.breakdown-value {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile adjustments for breakdown cards */
@media (max-width: 480px) {
    .cashback-breakdown {
        gap: 8px;
    }
    
    .breakdown-card {
        padding: 10px 8px;
        border-radius: 10px;
    }
    
    .breakdown-logo {
        width: 20px;
        height: 20px;
        margin-bottom: 4px;
    }
    
    .breakdown-label {
        font-size: 9px;
    }
    
    .breakdown-value {
        font-size: 13px;
    }
}

/* ========================================
   SITE FOOTER
   ======================================== */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-brand {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.footer-divider {
    color: rgba(102, 126, 234, 0.5);
    font-size: 10px;
}

.footer-copy {
    font-size: 12px;
    color: rgba(100, 100, 120, 0.8);
    font-weight: 500;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #16a34a;
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-error {
    background: #dc2626;
}

.toast.toast-success {
    background: #16a34a;
}
