/* =====================================================================
   DoubleDyn Carbon Terminal — admin-style.css
   Painel interno B2B — Glassmorphism dark theme
   ===================================================================== */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #e5e7eb;
    --text-muted: #6b7280;
    --green: #10b981;
    --blue: #3b82f6;
    --red: #ef4444;
    --gold: #f59e0b;
    --purple: #a855f7;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

/* ===== GLASSMORPHISM ===== */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ===== COVER OVERLAY ===== */
.cover-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    transition: opacity 0.5s ease;
}

.cover-content {
    text-align: center;
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 90%;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cover-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cover-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.cover-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
}

.cover-btn {
    margin-top: 1rem;
    padding: 14px 40px !important;
    font-size: 1rem !important;
    width: 100%;
    max-width: 320px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    margin: 1rem;
    border-radius: 12px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-links a, .nav-tab {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-links a:hover, .nav-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-links a.active, .nav-tab.active { color: #fff; background: rgba(16, 185, 129, 0.12); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }

/* ===== CONTAINER ===== */
.container { max-width: 1400px; margin: 0 auto; padding: 1.5rem 2rem; }

/* ===== TAB CONTENT ===== */
.tab-content { display: none; }
.tab-content:first-of-type { display: block; }

/* ===== OVERVIEW GRID ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 12px;
}

.stat-title { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.6rem; font-weight: 700; font-family: var(--font-mono); margin: 4px 0; }

.stat-change {
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
}

.stat-change.positive { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.stat-change.negative { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.stat-change.neutral { color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }

/* ===== ASSET TABS ===== */
.asset-tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    margin-bottom: 1rem;
    width: fit-content;
}

.asset-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.asset-tab:hover { color: #fff; }
.asset-tab.active { background: rgba(16, 185, 129, 0.12); color: #fff; }

/* ===== FILTERS ===== */
.filters-section {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 250px;
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
}

.search-box i { color: var(--text-muted); }

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 12px 0;
    width: 100%;
    outline: none;
}

.filter-controls { display: flex; gap: 1rem; flex-wrap: wrap; }

.filter-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    cursor: pointer;
    min-width: 140px;
}

/* ===== TABLE ===== */
.table-container { padding: 0; overflow-x: auto; }

.market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.market-table thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    white-space: nowrap;
}

.market-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
}

.market-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.market-table td {
    padding: 14px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.badge.toucan { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.badge.klima { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.badge.moss { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.badge.c3 { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
}

.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; display: block; }
.empty-state h2 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .overview-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar { flex-direction: column; gap: 0.8rem; padding: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 768px) {
    .overview-grid { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
    .navbar { margin: 0.5rem; }
    .filters-section { flex-direction: column; }
    .filter-controls { width: 100%; }
    .market-table { font-size: 0.8rem; }
    .market-table th, .market-table td { padding: 10px 8px; }
}

/* ===== PRINT ===== */
@media print {
    body { background: #fff; color: #111; }
    .navbar, .cover-overlay, .btn-primary, .nav-actions { display: none !important; }
    .container { max-width: 100%; padding: 0; }
    #certModal { position: static !important; background: transparent !important; }
    .modal-content { box-shadow: none !important; max-width: 100% !important; }
}
