/* =====================================================
   LinkMoney — Premium FinTech Theme
   ===================================================== */

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

:root {
    --primary: #4F7CFF;
    --secondary: #8B5CF6;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --bg: #F6F8FC;
    --card-bg: #FFFFFF;
    --border: #E8ECF5;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --success: #16A34A;
    --warning: #F59E0B;
    --danger: #EF4444;
    --radius: 20px;
    --shadow-soft: 0 4px 20px rgba(31, 41, 55, 0.06);
    --shadow-hover: 0 20px 40px rgba(79, 124, 255, 0.18);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------------- Animations ---------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes floaty { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-14px); } }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 rgba(79,124,255,0); } 50% { box-shadow: 0 0 30px rgba(139,92,246,0.25); } }

.fade-in { animation: fadeIn 0.6s ease both; }
.slide-up { animation: slideUp 0.6s ease both; }
.slide-left { animation: slideLeft 0.6s ease both; }
.slide-right { animation: slideRight 0.6s ease both; }
.floating { animation: floaty 5s ease-in-out infinite; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 26px;
    border-radius: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 124, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 28px rgba(79, 124, 255, 0.4); }

.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { transform: translateY(-3px); border-color: var(--primary); }

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- Cards ---------------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    transition: all 0.3s ease;
}

.card.hoverable:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
    cursor: pointer;
}

.stat-card { display: flex; flex-direction: column; gap: 10px; }
.stat-card .icon-box {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient); color: #fff; font-size: 20px;
}
.stat-card .stat-value { font-size: 28px; font-weight: 800; }
.stat-card .stat-label { color: var(--text-secondary); font-size: 14px; font-weight: 500; }

/* Wallet cards */
.wallets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1100px) { .wallets-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wallets-grid { grid-template-columns: 1fr; } }

.wallet-card { display: flex; flex-direction: column; gap: 14px; }
.wallet-card .wallet-head { display: flex; align-items: center; gap: 12px; }
.wallet-card .coin-icon {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; background: var(--gradient);
}
.wallet-card .wallet-balance { font-size: 22px; font-weight: 700; }
.wallet-card .wallet-actions { display: flex; gap: 10px; }

/* ---------------- Layout: Sidebar ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: #0B1437;
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; padding: 0 10px 24px; }
.sidebar .brand span.accent { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sidebar-menu { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    color: rgba(255,255,255,0.75); font-weight: 500; font-size: 14.5px;
    transition: all 0.25s ease;
}
.sidebar-menu a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-menu a.active { background: var(--gradient); color: #fff; box-shadow: 0 6px 18px rgba(79,124,255,0.35); }
.sidebar-promo { background: rgba(255,255,255,0.06); border-radius: 16px; padding: 16px; margin-top: 16px; }
.sidebar-promo h4 { margin: 0 0 6px; font-size: 14px; }
.sidebar-promo p { margin: 0 0 12px; font-size: 12.5px; color: rgba(255,255,255,0.7); }

/* ---------------- Layout: Topbar ---------------- */
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topnav {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20;
}
.topnav .search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 8px 14px; min-width: 220px;
}
.topnav .search-box input { border: none; background: transparent; outline: none; font-family: inherit; width: 100%; }
.topnav .nav-actions { display: flex; align-items: center; gap: 18px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

.page-body { padding: 28px; }

/* ---------------- Tables ---------------- */
.table-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table thead th {
    background: var(--bg); text-align: left; padding: 14px 18px;
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-secondary); position: sticky; top: 0;
}
table.data-table tbody td { padding: 14px 18px; border-top: 1px solid var(--border); font-size: 14.5px; }
table.data-table tbody tr:hover { background: #FAFBFF; }

/* ---------------- Badges ---------------- */
.badge { padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600; display: inline-block; }
.badge-success { background: #DCFCE7; color: #16A34A; }
.badge-warning { background: #FEF3C7; color: #D97706; }
.badge-danger { background: #FEE2E2; color: #DC2626; }
.badge-info { background: #DBEAFE; color: #2563EB; }
.badge-secondary { background: #F1F5F9; color: #64748B; }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.form-control {
    width: 100%; padding: 13px 16px; border-radius: 12px;
    border: 1.5px solid var(--border); background: #fff;
    font-family: inherit; font-size: 14.5px; transition: all 0.25s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,124,255,0.12); }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; }

.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg); padding: 24px;
}
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 24px; padding: 40px; box-shadow: var(--shadow-soft); }
.auth-card .brand { text-align: center; font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-secondary); margin-bottom: 28px; font-size: 14.5px; }

/* ---------------- Alerts ---------------- */
.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: #DCFCE7; color: #15803D; }
.alert-error { background: #FEE2E2; color: #B91C1C; }
.alert-info { background: #DBEAFE; color: #1D4ED8; }

/* ---------------- Icon Containers ---------------- */
.icon-round {
    width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient); color: #fff;
    transition: all 0.3s ease;
}
.icon-round:hover { transform: rotate(5deg) scale(1.08); }

/* ---------------- Utility ---------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* ---------------- Landing page ---------------- */
.public-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 60px; background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 30;
}
.public-nav { display: flex; gap: 32px; }
.public-nav a { font-weight: 500; color: var(--text-secondary); }
.public-nav a.active, .public-nav a:hover { color: var(--primary); }

.hero { padding: 70px 60px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; padding: 40px 24px; } .public-header { padding: 16px 24px; } }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin: 16px 0; }
.hero h1 .accent { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #EEF2FF; color: var(--primary); padding: 8px 16px; border-radius: 30px; font-size: 13px; font-weight: 600; }

.swap-preview { background: #fff; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-soft); padding: 24px; position: relative; }
.swap-col { flex: 1; background: var(--bg); border-radius: 16px; padding: 16px; }
.swap-col-title { padding: 10px 14px; border-radius: 12px; color: #fff; font-weight: 700; text-align: center; margin-bottom: 14px; }

.stats-strip { display: flex; justify-content: space-around; background: #fff; margin: 0 60px; border-radius: 20px; border: 1px solid var(--border); padding: 26px; box-shadow: var(--shadow-soft); }
@media (max-width: 900px) { .stats-strip { flex-wrap: wrap; gap: 20px; margin: 0 24px; } }
.stat-item { display: flex; align-items: center; gap: 12px; }
.stat-item .num { font-size: 22px; font-weight: 800; }

.site-footer { background: #0B1437; color: rgba(255,255,255,0.7); padding: 50px 60px 20px; margin-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: 30px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .site-footer { padding: 40px 24px 20px; } }
.footer-grid h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.footer-grid a { display: block; color: rgba(255,255,255,0.65); margin-bottom: 10px; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 30px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }
