/* style.css - Premium Banking V4 */
:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --surface-glass: rgba(255, 255, 255, 0.05);
    --surface-glass-heavy: rgba(255, 255, 255, 0.12);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --surface-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    --font-main: 'Outfit', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-color);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.glass-mode {
    background: var(--bg-gradient);
    background-attachment: fixed;
}

/* ======= LIGHT MODE ======= */
body.light-mode {
    --bg-gradient: linear-gradient(135deg, #e8edf5 0%, #dde3f0 100%);
    --bg-dark: #f0f4fc;
    --surface-glass: rgba(255,255,255,0.7);
    --surface-glass-heavy: rgba(255,255,255,0.9);
    --border-glass: rgba(0,0,0,0.08);
    --text-color: #0f172a;
    --text-muted: #64748b;
    --shadow: 0 8px 25px rgba(0,0,0,0.12);
}
body.light-mode .app-header { background: rgba(240,244,252,0.8); }
body.light-mode .bottom-nav { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.08); }
body.light-mode .glass-card { background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); }
body.light-mode .styled-input { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); color: var(--text-color); }
body.light-mode .chat-overlay { background: #fff; }
body.light-mode .icon-btn { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); color: var(--text-color); }
#app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 80px 20px 120px 20px;
    min-height: 100vh;
}

/* Glassmorphism Core */
.glass-card, .card, .modal-content {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card:hover {
    background: var(--surface-glass-heavy);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Header & Logo */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.6);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Balance Card Custom */
.balance-card {
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.balance-card h3 {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

.balance-card h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 10px 0;
    letter-spacing: -1px;
}

.bg-blur-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    width: 150px;
    height: 150px;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--surface-glass);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: 0.3s;
    border: 1px solid var(--border-glass);
}

.action-btn:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.action-btn span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

/* View Handling */
.view {
    animation: slideUp 0.5s ease-out;
}

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

.hidden { display: none !important; }

/* Buttons */
.btn {
    padding: 14px 24px;
    border-radius: 18px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 15px;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 20px;
    right: 20px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    padding: 12px;
    z-index: 1000;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    background: none;
    border: none;
    padding: 5px;
}

.nav-item i { font-size: 20px; }

.nav-item.active {
    color: var(--primary);
}

/* Modal Styling */
.modal {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; padding: 20px;
}

/* Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 15px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* List Items */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-glass);
}
.list-item:last-child { border-bottom: none; }

/* Form Styles */
.styled-input {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.03);
    color: white;
    font-family: inherit;
    margin-bottom: 15px;
    font-size: 15px;
    transition: 0.3s;
}

.styled-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Loader */
.loader-container {
    position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(5px);
    z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px;
}
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Toast */
#toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 10000;
}
.toast {
    background: #1e293b; color: white; padding: 16px 24px; border-radius: 16px;
    margin-bottom: 10px; box-shadow: var(--shadow); border: 1px solid var(--border-glass);
    animation: toastIn 0.3s ease-out;
}
@keyframes toastIn { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* Sidebar/Admin Fallback */
.sidebar { width: 250px; background: #0f172a; border-right: 1px solid var(--border-glass); height: 100vh; position: fixed; left: 0; top: 0; }
.main-content { margin-left: 250px; padding: 30px; }

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}

/* ===== MISSING CLASSES – FIXES ===== */

/* Utility */
.base-full-width { width: 100%; }
.text-center { text-align: center; }
.flex-center { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh;
    padding: 20px;
}

/* Buttons – secondary, danger */
.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-color);
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }

.btn-danger {
    background: rgba(239,68,68,0.12);
    color: var(--danger);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

/* List container */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* View title typography */
.view-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

/* Warning text in forms */
.warning-text {
    font-size: 12px;
    color: var(--warning);
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 15px;
}

/* Styled form */
.styled-form .form-group input,
.styled-form .form-group select,
.styled-form .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.04);
    color: var(--text-color);
    font-family: inherit;
    font-size: 15px;
    margin-top: 6px;
    transition: 0.3s;
}
.styled-form .form-group input:focus,
.styled-form .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
}

/* Chat overlay */
.chat-overlay {
    position: fixed;
    bottom: 100px;
    right: 20px;
    left: 20px;
    max-width: 420px;
    margin: 0 auto;
    background: #1e293b;
    border-radius: 24px;
    overflow: hidden;
    z-index: 1100;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid var(--border-glass);
}

.chat-header {
    background: var(--primary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.chat-messages {
    height: 280px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.msg.bot { background: rgba(255,255,255,0.08); align-self: flex-start; }
.msg.user { background: var(--primary); align-self: flex-end; }

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-glass);
}
.chat-input-area input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    outline: none;
    font-size: 14px;
    font-family: inherit;
}

/* Center nav circle (middle transfer button) */
.nav-item.center-nav {
    display: flex;
    justify-content: center;
    align-items: center;
}
.center-nav-circle {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 8px 20px var(--primary-glow);
    transition: 0.3s;
    margin-top: -28px;
}
.center-nav-circle:hover { transform: scale(1.1) rotate(15deg); }

/* Icon btn base */
.header-right { display: flex; gap: 10px; align-items: center; }
.icon-btn {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 16px; cursor: pointer; color: var(--text-color);
    transition: 0.3s;
}
.icon-btn:hover { background: rgba(255,255,255,0.14); transform: scale(1.1); }

/* Profile section */
.profile-header {
    text-align: center;
    padding: 30px 20px;
    background: var(--surface-glass);
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    margin-bottom: 20px;
}
.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 12px;
}
.profile-pic.default-pic { background: var(--primary); }

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(99,102,241,0.15);
    color: var(--primary);
    border: 1px solid rgba(99,102,241,0.3);
}

/* Tabs styling */
.tabs { display: flex; margin-bottom: 20px; background: rgba(255,255,255,0.04); padding: 5px; border-radius: 14px; }
.tab-btn { flex: 1; border: none; padding: 10px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.3s; font-family: inherit; font-size: 14px; }

/* canvas container */
.canvas-container {
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border-glass);
}
#signature-pad { display: block; width: 100%; border: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

/* Section title */
.section-title { font-size: 18px; font-weight: 700; margin: 20px 0 12px 0; color: #fff; }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.action-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; background: none; border: none; color: inherit; padding: 0; }
.icon-box { 
    width: 58px; height: 58px;
    background: rgba(255,255,255,0.06);
    border-radius: 18px;
    display: flex; justify-content: center; align-items: center;
    font-size: 20px; transition: 0.3s;
    border: 1px solid var(--border-glass);
    color: var(--text-color);
}
.action-btn:hover .icon-box {
    background: var(--primary); color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px var(--primary-glow);
}
.action-btn span { font-size: 11px; font-weight: 500; color: var(--text-muted); }

/* Balance card typography */
.balance-card h3 { font-size: 13px; font-weight: 400; color: rgba(255,255,255,0.7); margin: 0 0 6px 0; }
.balance-card h1 { font-size: 38px; font-weight: 800; margin: 0; letter-spacing: -1px; }
