body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.monterly-layout {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 60px);
}

/* Sidebar fixed width */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}

/* Content area */
.monterly-app {
    flex: 1;
    min-width: 0;
}

/* ===============================
   BASE
=============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f6f8fb, #eef2f7);
    color: #1f2937;
}

/* ===============================
   TOP BAR
=============================== */
.monterly-topbar {
    height: 60px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ===============================
   SIDEBAR
=============================== */
.sidebar {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px);
    min-height: calc(100vh - 60px);
    border-right: 1px solid rgba(0,0,0,0.05);
    padding: 12px;
}

.sidebar .nav-link {
    color: #4b5563;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.25s;
}

.sidebar .nav-link:hover {
    background: rgba(16,185,129,0.1);
    color: #10b981;
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 10px 20px rgba(16,185,129,0.25);
}

/* ===============================
   MAIN APP AREA
=============================== */
.monterly-app {
    background:
        radial-gradient(circle at 10% 90%, rgba(16,185,129,0.12), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(59,130,246,0.12), transparent 40%),
        #f6f8fb;
    min-height: calc(100vh - 60px);
    padding: 32px;
}

/* ===============================
   CARDS
=============================== */
.card,
.stat-card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow:
        0 10px 30px rgba(0,0,0,0.05),
        inset 0 0 0 1px rgba(255,255,255,0.6);
}

.card h5,
.card h6 {
    color: #1f2937;
    font-weight: 600;
}

.card p {
    color: #6b7280;
}

/* ===============================
   STAT CARDS
=============================== */
.stat-card h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
}

.stat-card small {
    color: #6b7280;
}

.stat-card .positive {
    color: #10b981;
}

/* ===============================
   BUTTONS
=============================== */
.btn-primary,
.btn-dark {
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16,185,129,0.35);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-outline-danger {
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* ===============================
   FORMS
=============================== */
.form-control,
.form-select,
textarea {
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 10px 14px;
    color: #1f2937;
}

.form-control:focus,
.form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}

/* ===============================
   TABLES
=============================== */
.table {
    background: transparent;
    color: #1f2937;
}

.table thead th {
    color: #6b7280;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.table tbody tr {
    background: rgba(255,255,255,0.6);
}

.table tbody tr:hover {
    background: rgba(16,185,129,0.08);
}

/* ===============================
   FLOATING ADD BUTTON
=============================== */
.fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 50%;
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(16,185,129,0.45);
    z-index: 999;
}

/* ===============================
   MOBILE
=============================== */
@media(max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 60px;
        left: -260px;
        width: 260px;
        height: 100%;
        transition: 0.3s;
        z-index: 999;
    }

    .sidebar.show {
        left: 0;
    }

    .monterly-app {
        padding: 16px;
    }
}


/* ===============================
   TRADE HISTORY UI
=============================== */

.trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trade-header h4 {
    font-weight: 700;
}

/* Stats boxes */
.stat-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    border: 1px solid #eef2f7;
    font-weight: 600;
    color: #111827;
}

.stat-box b {
    font-size: 22px;
    display: block;
    margin-top: 6px;
    color: #10b981;
}

/* Filters */
.trade-filters {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.04);
    border: 1px solid #eef2f7;
}

/* Trade Table */
.trade-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.trade-table thead th {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
}

.trade-table tbody tr {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
}

.trade-table tbody td {
    padding: 14px 12px;
    border: none;
    vertical-align: middle;
}

/* Result badges */
.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
}

.bg-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.bg-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.bg-secondary {
    background: #e5e7eb !important;
    color: #374151 !important;
}

/* Profit colors */
.text-success {
    color: #10b981 !important;
    font-weight: 600;
}

.text-danger {
    color: #ef4444 !important;
    font-weight: 600;
}

/* Table wrapper */
.trade-table-wrapper {
    background: transparent;
    padding: 0;
}

/* Hover */
.trade-table tbody tr:hover {
    transform: translateY(-2px);
    transition: 0.15s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

/* Mobile */
@media(max-width: 768px){
    .trade-table thead {
        display: none;
    }

    .trade-table tbody tr {
        display: block;
        margin-bottom: 12px;
        padding: 12px;
    }

    .trade-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
    }

    .trade-table tbody td:before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 12px;
    }
}
