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

:root {
    --bg-color: #f0f4f8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #0052cc;
    --primary-gradient: linear-gradient(135deg, #0052cc 0%, #00a3ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --danger: #ef4444;
    --success: #22c55e;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg-color); color: var(--text-main); transition: background 0.3s ease; min-height: 100vh; display: flex; flex-direction: column; align-items: center; }

/* Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}
.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.container { width: 100%; max-width: 480px; padding: 20px; margin: 0 auto; } /* Mobile First */
.admin-container { max-width: 1200px; padding: 20px; margin: 0 auto; width: 100%; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: 12px; border: none; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; overflow: hidden; position: relative;
    width: 100%; font-size: 16px;
}
.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 4px 15px rgba(0,82,204,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,82,204,0.4); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }

/* Ripple Effect */
.ripple {
    position: absolute; background: rgba(255,255,255,0.3); border-radius: 50%;
    transform: scale(0); animation: ripple-anim 0.6s linear; pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.form-control {
    width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1); color: var(--text-main); font-size: 16px;
    outline: none; transition: border 0.3s;
}
.form-control:focus { border-color: var(--primary); }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.logo-icon { width: 36px; height: 36px; background: var(--primary-gradient); color: white; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.user-controls { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); cursor: pointer;}
.icon-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-main); }

/* Main Card */
.main-card { padding: 24px; color: white; background: var(--primary-gradient); margin-bottom: 24px; position: relative; overflow: hidden; }
.main-card::before {
    content: ''; position: absolute; top: -50px; right: -50px; width: 150px; height: 150px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.card-top { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: center;}
.balance-area { text-align: center; margin-bottom: 20px; }
.balance-text { font-size: 32px; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: all 0.3s ease; }
.acc-info { display: flex; justify-content: space-between; align-items: center; font-size: 14px; background: rgba(0,0,0,0.2); padding: 10px 15px; border-radius: 12px;}

/* Quick Menu */
.quick-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 24px; text-align: center; }
.menu-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 500;}
.menu-icon { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--glass-bg); box-shadow: var(--glass-shadow); transition: transform 0.2s; color: var(--primary); }
.menu-item:hover .menu-icon { transform: translateY(-5px); }

/* History Timeline */
.history-section { background: var(--glass-bg); border-radius: 24px; padding: 20px; margin-bottom: 20px;}
.history-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.timeline-item { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.timeline-item:last-child { border-bottom: none; }
.tl-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.tl-icon.send { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.tl-icon.receive { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.tl-content { flex: 1; }
.tl-title { font-weight: 600; font-size: 14px; }
.tl-time { font-size: 12px; color: var(--text-muted); }
.tl-amount { font-weight: 700; }
.tl-amount.send { color: var(--danger); }
.tl-amount.receive { color: var(--success); }

/* Toast */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    padding: 15px 20px; border-radius: 12px; color: white; font-weight: 500;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }

/* Modals */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px); z-index: 1000; display: none; align-items: center; justify-content: center;
}
.modal.active { display: flex; animation: fadeIn 0.3s; }
.modal-content { background: var(--glass-bg); width: 90%; max-width: 400px; padding: 24px; border-radius: 24px; box-shadow: var(--glass-shadow); transform: scale(0.9); animation: scaleUp 0.3s forwards; position: relative;}
.close-modal { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted);}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { to { transform: scale(1); } }

/* Admin Panel Specifics */
.admin-header { display: flex; justify-content: space-between; margin-bottom: 30px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { padding: 20px; text-align: center; }
.stat-card h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.stat-card .val { font-size: 28px; font-weight: 700; color: var(--primary); }
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 15px; border-bottom: 1px solid var(--glass-border); font-size: 14px;}
th { font-weight: 600; color: var(--text-muted); }
.action-btn { padding: 6px 12px; border-radius: 6px; border: none; cursor: pointer; font-size: 12px; margin-right: 5px; color: white;}
.btn-edit { background: #eab308; }
.btn-delete { background: var(--danger); }
.btn-lock { background: #64748b; }

/* Responsive Adjustments */
@media (min-width: 768px) {
    .container { max-width: 768px; }
    .quick-menu { grid-template-columns: repeat(8, 1fr); }
}