:root {
    --bg-color: #f8fafc; /* Light Slate 50 */
    --gold: #D4AF37;
    --gold-dim: rgba(212, 175, 55, 0.15);
    --text-main: #1e293b; /* Dark Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(200, 200, 200, 0.3);
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Animations */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.blob.gold {
    width: 400px;
    height: 400px;
    background: var(--gold);
    top: -100px;
    right: -100px;
}

.blob.dark {
    width: 500px;
    height: 500px;
    background: #bae6fd; /* Sky blue */
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 100px) scale(1.2); }
}

/* Layout */
.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 40px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2px;
}

.date-time {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Screens */
.screen {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.slide-up {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Utilities */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-10 { margin-bottom: 10px; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.gold-text { color: var(--gold); }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

h2 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
p { color: var(--text-muted); line-height: 1.5; font-size: 1.1rem; }

/* Entry Screen */
.icon-pulse {
    font-size: 4rem;
    color: var(--gold);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
.card-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255,255,255,0.5);
    color: var(--text-main);
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}
.card-input:focus {
    outline: none;
    border-color: var(--gold);
    background: white;
}
.btn-gold-solid {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--gold-dim);
}
.btn-gold-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* Numpad Screen */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.pin-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    transition: all 0.3s;
}
.pin-dot.filled {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-dim);
}
.pin-dot.error {
    background: var(--danger);
    border-color: var(--danger);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}
.num-btn {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    margin: 0 auto;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.num-btn:hover, .num-btn:active {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.05);
}
.action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
}
.action-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: transparent;
}

/* Dashboard Screen */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    width: 100%;
}
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
.dashboard-grid .glass-card {
    max-width: 100%;
    padding: 30px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-logout:hover {
    background: var(--danger);
    color: white;
}

.owner-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}
.balance-amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
    margin: 20px 0;
}
.balance-amount small {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}
.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.stat-item strong {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-top: 5px;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}
/* Custom Scrollbar */
.transactions-list::-webkit-scrollbar {
    width: 6px;
}
.transactions-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}
.transactions-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    transition: background 0.2s;
}
.tx-item:hover {
    background: rgba(0,0,0,0.06);
}
.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}
.tx-icon.debit {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.tx-icon.credit {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.tx-icon.cashback {
    background: var(--gold-dim);
    color: var(--gold);
}
.tx-details {
    flex: 1;
}
.tx-title {
    font-weight: 600;
    margin-bottom: 3px;
}
.tx-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.tx-amount {
    font-weight: 800;
    font-size: 1.1rem;
}

/* Alerts */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fcc-alert {
    padding: 15px 25px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: slideInRight 0.3s forwards;
    border-left: 4px solid;
}
.fcc-alert.error { border-color: var(--danger); }
.fcc-alert.success { border-color: var(--success); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}
