/**
 * Pips Market - Core Fintech Dashboard & App Stylesheet
 * Primary Theme: Deep Navy / Fintech Dark (#0b0e14 - #121722)
 * Accents: Electric Blue (#2563eb), Forest/Emerald Green (#10b981), Risk Red (#ef4444)
 */

:root {
    --bg-main: #0b0e14;
    --bg-card: #121722;
    --bg-card-hover: #171f2e;
    --bg-surface: #182030;
    --bg-input: #0f1523;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.15);
    
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-green-light: rgba(16, 185, 129, 0.15);
    
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-red-light: rgba(239, 68, 68, 0.15);

    --accent-gold: #f59e0b;
    --accent-purple: #8b5cf6;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border-color: #1e293b;
    --border-light: #334155;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-glow-blue: 0 0 25px rgba(37, 99, 235, 0.25);
    --shadow-glow-green: 0 0 25px rgba(16, 185, 129, 0.25);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --sidebar-width: 280px;
    --header-height: 68px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #60a5fa;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.25;
}

/* App Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

.content-body {
    flex: 1;
    padding: 24px 20px 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .content-body {
        padding: 30px;
    }
}

/* Top App Header */
.app-header {
    height: var(--header-height);
    background-color: rgba(18, 23, 34, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: var(--bg-surface);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.brand-logo .brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(37,99,235,0.4);
}

.brand-logo span.accent {
    color: #3b82f6;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border: 2px solid #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(37,99,235,0.4);
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slide-out Sidebar Drawer */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.6);
}

.sidebar-drawer.open {
    transform: translateX(0);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    list-style: none;
}

.sidebar-item {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: var(--bg-surface);
}

.sidebar-link.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
    font-weight: 600;
}

.sidebar-link .menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #0d121c;
}

.lang-select-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.lang-select {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13px;
    cursor: pointer;
}

/* UI Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Welcome & Action Bar */
.welcome-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .welcome-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.welcome-text h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 14px;
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-glow-blue);
    color: #ffffff;
}

.btn-success {
    background: var(--accent-green);
    color: #ffffff;
}

.btn-success:hover {
    background: var(--accent-green-hover);
    box-shadow: var(--shadow-glow-green);
    color: #ffffff;
}

.btn-danger {
    background: var(--accent-red);
    color: #ffffff;
}

.btn-danger:hover {
    background: var(--accent-red-hover);
    color: #ffffff;
}

.btn-dark-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: #ffffff;
}

.btn-dark-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* Alert Banners */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: var(--accent-red-light);
    border: 1px solid var(--accent-red);
    color: #fca5a5;
}

.alert-success {
    background: var(--accent-green-light);
    border: 1px solid var(--accent-green);
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--accent-gold);
    color: #fde047;
}

.alert-info {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: #93c5fd;
}

.alert-icon {
    font-size: 18px;
    font-weight: 700;
}

/* Big Balance Overview Card */
.balance-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #1d4ed8 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 28px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.balance-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 600;
}

.balance-amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.balance-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-light);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.icon-blue { background: rgba(37, 99, 235, 0.15); color: #3b82f6; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.icon-gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.stat-info {
    flex: 1;
}

.stat-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group {
    display: flex;
    position: relative;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.table th {
    background: #0f1420;
    color: var(--text-muted);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(37, 99, 235, 0.15); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }

/* Tabs */
.tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Trading Bot Package Cards */
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.bot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.bot-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.bot-card.popular {
    border-color: #8b5cf6;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.bot-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.bot-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.bot-avatar {
    width: 56px;
    height: 56px;
    background: #182234;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid var(--border-light);
}

.bot-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.bot-price {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
}

.bot-specs {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}

.bot-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--text-muted);
}

.bot-spec-item span.highlight {
    color: #ffffff;
    font-weight: 600;
}

/* Crypto QR & Payment Details Box */
.crypto-payment-box {
    background: #0f1523;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-top: 20px;
}

.qr-code-wrapper {
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    margin: 16px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.copy-input-group {
    display: flex;
    background: #0a0e17;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 10px;
}

.copy-input-group input {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 12px 16px;
    font-family: monospace;
    font-size: 13px;
    flex: 1;
    outline: none;
}

.copy-input-group button {
    background: var(--primary);
    border: none;
    color: #ffffff;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.copy-input-group button:hover {
    background: var(--primary-hover);
}

/* Watchlist & News Item styling */
.watchlist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.watchlist-row:hover {
    background: rgba(255,255,255,0.02);
}

.pair-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pair-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.pair-symbol {
    font-weight: 700;
    color: #ffffff;
    font-size: 14px;
}

.pair-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.pair-price {
    text-align: right;
}

.price-val {
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
    font-family: monospace;
}

.price-change {
    font-size: 12px;
    font-weight: 600;
}

.price-up { color: var(--accent-green); }
.price-down { color: var(--accent-red); }

/* News List */
.news-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
    line-height: 1.4;
}

.news-meta {
    font-size: 12px;
    color: var(--text-dim);
}

/* Footer */
.app-footer {
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* ==========================================
   Google Translate Styling & Overrides
   ========================================== */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
    visibility: hidden !important;
}

body {
    top: 0px !important;
    position: static !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

#google_translate_element {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
    font-size: 0 !important;
}

.goog-te-gadget .goog-te-combo {
    display: none !important;
}

.lang-select {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: auto;
}

.lang-select:hover, .lang-select:focus {
    border-color: #3b82f6;
    background: #1e293b;
}

.lang-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Password Input Visibility Toggle Styles */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrap .form-control {
    padding-right: 44px !important;
}

.eye-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s, background-color 0.15s;
    z-index: 5;
}

.eye-toggle:hover {
    color: #f8fafc;
    background-color: rgba(255, 255, 255, 0.08);
}

.eye-toggle:focus {
    outline: none;
    color: #38bdf8;
}

.eye-icon {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

