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

:root {
    --bg-black: #000000;
    --sidebar-bg: #000000;
    --card-bg: #000000;
    --card-border: #1a1a1a;
    --text-dim: #666666;
    --text-bright: #ffffff;
    --green: #10b981;
    --red: #ef4444;
    --pill-bg: #1a1a1a;
    --active-bg: rgba(16, 185, 129, 0.1);
    --terminated-bg: rgba(239, 44, 44, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.dashboard-body {
    background-color: var(--bg-black);
    color: var(--text-bright);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid #111;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.logo span.cursor { color: var(--text-dim); }

.nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav { flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.2rem;
}

.nav-item.active {
    background: #1a1a1a;
    color: white;
}

.nav-item i { width: 20px; font-size: 1rem; }
.nav-item:hover:not(.active) { color: white; }

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid #111;
    margin-top: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #222; }
.username { font-weight: 700; font-size: 0.85rem; color: white; }
.balance-sub { color: var(--green); font-size: 0.75rem; font-weight: 700; }

.logout-btn {
    color: var(--red);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.status-indicator {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.status-text { color: white; }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.icon-btn {
    background: #111;
    border: none;
    color: var(--text-dim);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-chip {
    background: #111;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

.balance-chip span.green { color: var(--green); margin-left: 5px; }

/* Stats Grid */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.b2001-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.stat-card { padding: 1.5rem 2rem; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; }
.card-label { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }
.card-value { font-size: 2rem; font-weight: 700; color: white; margin: 0.5rem 0; }
.card-sub-label { font-size: 0.75rem; font-weight: 600; color: var(--text-dim); }
.card-sub-label.green { color: var(--green); }

/* Table Section */
.detail-card { 
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 { font-size: 1rem; font-weight: 700; }
.more-btn {
    background: #1a1a1a;
    color: var(--text-dim);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.b2001-table {
    width: 100%;
    border-collapse: collapse;
}

.b2001-table th {
    text-align: left;
    padding: 1rem 2rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.b2001-table td {
    padding: 1.25rem 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
    color: #dfdfdf;
}

.pill {
    background: var(--pill-bg);
    padding: 4px 10px;
    border-radius: 4px;
    color: #888;
    font-family: 'monospace';
    font-size: 0.8rem;
}

.status-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
}

.status-tag.active { background: var(--active-bg); color: var(--green); }
.status-tag.terminated { background: var(--terminated-bg); color: var(--green); opacity: 0.5; }

/* Inset Map */
.b2001-map { height: 350px; border-top: 1px solid var(--card-border); }

/* Search Controls */
.search-container { margin-bottom: 2rem; }
.b2001-search-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    gap: 1rem;
}

.b2001-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 0.9rem;
    padding-left: 0.5rem;
}

.b2001-search-box button {
    background: white;
    color: black;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1rem 0;
    display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* History Section */
.history-section { margin-top: 2rem; }
.history-chips { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.history-chip {
    background: #0a0a0a;
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
}
.history-chip:hover { color: white; border-color: #333; }

/* Mobile */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .stats-row { grid-template-columns: 1fr; }
}
