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

:root {
    --dark-navy: #0B132B;
    --royal-blue: #1C2541;
    --accent-blue: #3A506B;
    --gold: #D4AF37;
    --gold-hover: #F3E5AB;
    --white: #FFFFFF;
    --text-light: #E0E0E0;
    --success: #10b981;
    --danger: #ef4444;
    --glass-bg: rgba(28, 37, 65, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--dark-navy);
    color: var(--white);
    overflow-x: hidden;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--dark-navy), var(--royal-blue));
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.auth-card h2 { text-align: center; margin-top: 0; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-light); font-size: 13px; font-weight: 500; }
.form-control { width: 100%; padding: 14px; border-radius: 10px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.05); color: var(--white); box-sizing: border-box; outline: none; transition: all 0.3s ease; font-size: 15px; }
.form-control:focus { border-color: var(--gold); background: rgba(255, 255, 255, 0.1); }
.btn-primary { width: 100%; padding: 14px; background: linear-gradient(45deg, var(--gold), #B8860B); color: var(--dark-navy); border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; text-align: center; box-sizing: border-box; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5); }

.alert { padding: 14px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; border-left: 4px solid; font-weight: 500; }
.alert-danger { background: rgba(239, 68, 68, 0.1); border-color: var(--danger); color: #fca5a5; }
.alert-success { background: rgba(16, 185, 129, 0.1); border-color: var(--success); color: #6ee7b7; }

/* Dashboard Layout */
.dashboard-layout { display: flex; min-height: 100vh; position: relative; }
.mobile-menu-toggle { display: none; position: fixed; top: 20px; right: 20px; z-index: 1001; background: var(--glass-bg); border: 1px solid var(--gold); color: var(--gold); border-radius: 8px; padding: 10px 15px; font-size: 20px; cursor: pointer; backdrop-filter: blur(5px); }

.sidebar { position: fixed; top: 0; left: 0; height: 100vh; box-sizing: border-box; overflow-y: auto; width: 260px; background: var(--royal-blue); padding: 30px 0 80px 0; border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; transition: transform 0.3s ease; z-index: 1000; box-shadow: 2px 0 15px rgba(0,0,0,0.2); scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-brand { text-align: center; color: var(--gold); font-size: 1.5rem; font-weight: 800; margin-bottom: 30px; padding: 0 20px; text-transform: uppercase; letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; color: var(--text-light); text-decoration: none; padding: 12px 25px; margin: 4px 10px; border-radius: 8px; transition: all 0.3s; font-weight: 500; }
.nav-item:hover, .nav-item.active { background: rgba(212, 175, 55, 0.1); color: var(--gold); }
.nav-item i { width: 35px; font-size: 1.2rem; }

.main-content { flex: 1; padding: 40px; box-sizing: border-box; width: calc(100% - 260px); margin-left: 260px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.user-info { display: flex; align-items: center; gap: 20px; }
.avatar { width: 45px; height: 45px; border-radius: 12px; background: var(--gold); display: flex; align-items: center; justify-content: center; color: var(--dark-navy); font-weight: bold; font-size: 1.2rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-bottom: 40px; }
.stat-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 15px; padding: 30px; display: flex; align-items: center; gap: 25px; transition: transform 0.3s, box-shadow 0.3s; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); border-color: rgba(212, 175, 55, 0.3); }
.stat-icon { width: 65px; height: 65px; border-radius: 16px; background: rgba(212, 175, 55, 0.1); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.stat-details h4 { margin: 0 0 8px; color: var(--text-light); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-details h2 { margin: 0; color: var(--white); font-size: 28px; font-weight: 700; }

.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; }
.panel { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 15px; padding: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
.panel h3 { margin-top: 0; color: var(--gold); border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.4rem; }

.crypto-item { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.3s; }
.crypto-item:hover { background: rgba(255,255,255,0.02); padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.crypto-item:last-child { border-bottom: none; }
.crypto-name { display: flex; align-items: center; gap: 15px; font-weight: 600; font-size: 1.1rem; }
.crypto-price { text-align: right; font-family: monospace; font-size: 1.1rem; font-weight: bold; }
.up { color: var(--success); }
.down { color: var(--danger); }

/* Forms & Tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 20px; color: var(--white); }
table th { color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; padding: 15px; border-bottom: 1px solid var(--glass-border); background: rgba(0,0,0,0.1); }
table th:first-child { border-top-left-radius: 10px; }
table th:last-child { border-top-right-radius: 10px; }
table td { padding: 18px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); font-weight: 500; font-size: 14px; }
table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.badge { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.badge-pending { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid #fbbf24; }
.badge-approved, .badge-active { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid #34d399; }
.badge-rejected, .badge-failed { background: rgba(239, 68, 68, 0.2); color: var(--danger); border: 1px solid var(--danger); }

/* Mobile Navigation Fixes */
/* Frontend Specific */
@media (max-width: 900px) {
    .nav { flex-direction: column; padding: 20px; gap: 15px; }
    .nav-links { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 15px; }
    .nav-links a { margin: 0; }
    .hero h1 { font-size: 2.5rem; padding: 0 20px; }
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); width: 260px; background: var(--royal-blue); z-index: 1002; transition: transform 0.3s ease; }
    .sidebar.active { transform: translateX(0); }
    .main-content { width: 100%; padding: 20px; margin-top: 30px; margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 30px 20px; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Success/Action Modal */
.action-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 19, 43, 0.85); backdrop-filter: blur(8px);
    z-index: 9999; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.action-modal-overlay.show { opacity: 1; pointer-events: auto; }

.action-modal {
    background: linear-gradient(135deg, var(--royal-blue), var(--dark-navy));
    border: 1px solid var(--gold); border-radius: 20px;
    padding: 30px; text-align: center; max-width: 400px; width: 90%;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    transform: scale(0.8); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.action-modal-overlay.show .action-modal { transform: scale(1); }

.action-modal-icon {
    width: 80px; height: 80px; background: rgba(16, 185, 129, 0.1);
    color: var(--success); border-radius: 50%; display: flex;
    justify-content: center; align-items: center; font-size: 40px;
    margin: 0 auto 20px; border: 2px solid var(--success);
}
.action-modal-title { color: var(--gold); font-size: 22px; margin-bottom: 10px; font-weight: bold; }
.action-modal-text { color: var(--text-light); font-size: 15px; margin-bottom: 25px; line-height: 1.5; }
.action-modal-btn {
    background: var(--gold); color: var(--dark-navy); border: none;
    padding: 12px 30px; border-radius: 10px; font-weight: bold; font-size: 16px;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.action-modal-btn:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4); }

/* Live Chat Widget */
.chat-widget-overlay {
    position: fixed; bottom: 20px; right: 20px; z-index: 10000;
    width: 350px; height: 500px;
    background: linear-gradient(135deg, var(--dark-navy), var(--royal-blue));
    border: 1px solid var(--gold); border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateY(120%) scale(0.9); opacity: 0; pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}
.chat-widget-overlay.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.chat-widget-header {
    background: rgba(0,0,0,0.3); padding: 15px 20px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1); cursor: move;
}
.chat-widget-title { color: var(--gold); font-weight: bold; display: flex; align-items: center; gap: 10px; margin: 0; }
.chat-widget-controls { display: flex; gap: 10px; }
.chat-widget-controls button { background: none; border: none; color: var(--text-light); cursor: pointer; transition: color 0.2s; padding: 0; }
.chat-widget-controls button:hover { color: var(--white); }

.chat-widget-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background: rgba(0,0,0,0.1); }

.chat-widget-input-area { background: rgba(0,0,0,0.3); padding: 15px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; gap: 10px; }
.chat-widget-input-area input { flex: 1; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); padding: 0 15px; color: var(--white); outline: none; }
.chat-widget-input-area input:focus { border-color: var(--gold); }
.chat-widget-input-area button { background: var(--gold); color: var(--dark-navy); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.chat-widget-input-area button:hover { transform: scale(1.1); }

@media (max-width: 768px) {
    .chat-widget-overlay {
        width: 100vw; height: 100vh;
        bottom: 0; right: 0; border-radius: 0;
    }
}
