.font-playfair { font-family: 'Playfair Display', serif; }
.font-inter { font-family: 'Inter', sans-serif; }

/* Period Buttons — Emerald theme */
.period-btn { transition: all 0.2s ease; }
.active-period {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
    color: #0a1628 !important;
    border-color: transparent !important;
}

/* Edge Timeframe Filter Buttons */
.edge-period-btn { transition: all 0.2s ease; }
.active-edge-period {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
    color: #0a1628 !important;
    border-color: transparent !important;
}
.active-edge-period-emerald {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
    color: #0a1628 !important;
    border-color: transparent !important;
}

/* Week Navigation */
.week-nav-button { transition: all 0.2s ease; }
.week-nav-button:hover:not(:disabled) { background: rgba(52, 211, 153, 0.2); border-color: rgba(52, 211, 153, 0.5); }
.week-nav-button:disabled { opacity: 0.3; cursor: not-allowed; }

/* Stat Cards */
.stat-card { transition: all 0.3s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(52, 211, 153, 0.2); }

/* Trade Table */
.trade-table { overflow-x: auto; }
.trade-table table { width: 100%; border-collapse: collapse; }
.trade-table th { background: rgba(52, 211, 153, 0.08); padding: 10px 8px; text-align: left; font-weight: 600; border-bottom: 2px solid rgba(52, 211, 153, 0.2); white-space: nowrap; }
.trade-table td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); white-space: nowrap; }
.trade-table tr:hover { background: rgba(52, 211, 153, 0.04); }

/* Risk distribution bars */
.risk-bar { height: 6px; border-radius: 3px; transition: width 0.8s ease; }
.risk-bar-bg { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.05); }

/* Animated count */
.count-up { transition: all 0.5s ease; }

/* Fade-in animation for sections */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Pulse animation for live indicator — Emerald */
@keyframes pulse-emerald {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

.pulse-emerald {
    animation: pulse-emerald 2s infinite;
}

/* Chart container hover effect */
.chart-container:hover {
    border-color: rgba(52, 211, 153, 0.3);
}

/* Monthly summary table styling */
.trade-table tr:last-child td {
    border-bottom: none;
}

/* Scrollbar — Emerald */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background: rgba(52, 211, 153, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(52, 211, 153, 0.5); }

/* Mobile improvements */
@media (max-width: 640px) {
    .trade-table { font-size: 11px; }
    .trade-table th, .trade-table td { padding: 6px 4px; }
    .stat-card { padding: 12px !important; }
    .stat-card p.text-2xl { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .stat-card p.text-2xl { font-size: 1.1rem; }
    .stat-card .text-\[10px\] { font-size: 9px; }
}

/* Food Chain Section */
.foodchain-bar {
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.foodchain-highlight-row {
    background: rgba(52, 211, 153, 0.06);
    border-radius: 8px;
    padding: 4px 6px;
    margin: -4px -6px;
    border: 1px solid rgba(52, 211, 153, 0.15);
}

#foodchain-tenx {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes foodchain-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(52, 211, 153, 0.15); }
    50% { box-shadow: 0 0 16px rgba(52, 211, 153, 0.35); }
}

/* Food chain chart container */
#txfc-position-chart {
    min-height: 200px;
}

/* Print styling */
@media print {
    header, .tab-button, .week-nav-button, .period-btn, label, button { display: none !important; }
    body { background: white; color: #333; }
    .stat-card { border: 1px solid #ddd; }
    .bg-gradient-to-br { background: white !important; }
}

/* ===== TRADE LOG FILTER BUTTONS — Emerald ===== */
.trade-filter-btn { transition: all 0.15s ease; cursor: pointer; }
.trade-filter-btn:hover { border-color: rgba(52, 211, 153, 0.4) !important; color: #34d399 !important; }
.trade-filter-active {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
    color: #0a1628 !important;
    border-color: transparent !important;
    font-weight: 700;
}
.trade-filter-active-emerald {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%) !important;
    color: #0a1628 !important;
    border-color: transparent !important;
    font-weight: 700;
}

/* ===== TRADE LOG SORT HEADERS ===== */
.sortable-th { cursor: pointer; user-select: none; }
.sortable-th:hover { color: #34d399 !important; }
.sort-asc::after { content: ' \2191'; color: #34d399; }
.sort-desc::after { content: ' \2193'; color: #34d399; }

/* ===== SYNC STATUS BADGE ===== */
.sync-status-badge { transition: opacity 0.3s ease; }

/* ===== SKELETON LOADER ===== */
@keyframes skeleton-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
    display: inline-block;
}
.skeleton-text { height: 1em; width: 4rem; }
.skeleton-text-lg { height: 1.5em; width: 5rem; }
