/* Trading Dashboard - Tema chiaro/scuro e stili personalizzati */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Varianti tema */
body.theme-dark {
    background-color: #0f1012;
    color: #e1e3e6;
}

body.theme-light {
    background-color: #f5f6f8;
    color: #212529;
}

/* Navbar principale */
.main-navbar {
    background: linear-gradient(90deg, #111827, #020617);
    border-color: rgba(148, 163, 184, 0.4);
}

body.theme-light .main-navbar {
    background: linear-gradient(90deg, #ffffff, #f1f5f9);
    border-color: rgba(148, 163, 184, 0.6);
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, #4ade80, #22c55e 40%, #16a34a 70%);
    color: #0f172a;
    font-size: 1.1rem;
}

/* Pulsante tema */
.theme-toggle-btn {
    border-radius: 999px;
    padding-inline: 0.75rem;
}

body.theme-dark .theme-toggle-btn {
    color: #e5e7eb;
    border-color: #4b5563;
}

body.theme-light .theme-toggle-btn {
    color: #374151;
    border-color: #9ca3af;
}

/* Card generiche */
.card {
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(6px);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

body.theme-dark .card {
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.55);
}

body.theme-light .card {
    background-color: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.6);
}

/* Card KPI */
.kpi-card {
    border-left-width: 4px;
    border-left-color: #22c55e;
}

.kpi-card .card-title {
    font-weight: 600;
}

/* Card pannelli principali */
.panel-card {
    border-radius: 1rem;
}

.panel-card .card-header {
    font-weight: 500;
    font-size: 0.9rem;
}

body.theme-dark .panel-card .card-header {
    background-color: rgba(15, 23, 42, 0.9);
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

body.theme-light .panel-card .card-header {
    background-color: #f8fafc;
    border-bottom-color: rgba(148, 163, 184, 0.45);
}

/* Tabelle */
.table-theme {
    font-size: 0.9rem;
}

body.theme-dark .table-theme {
    --bs-table-bg: #020617;
    --bs-table-striped-bg: #020617;
    --bs-table-striped-color: inherit;
}

body.theme-light .table-theme {
    --bs-table-bg: #ffffff;
}

.table-theme thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
}

body.theme-dark .table-theme thead th {
    background-color: #020617;
    border-color: rgba(148, 163, 184, 0.45);
}

body.theme-light .table-theme thead th {
    background-color: #f9fafb;
    border-color: rgba(148, 163, 184, 0.5);
}

.table-theme tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.06);
}

/* Tabs */
.nav-tabs .nav-link {
    border-color: transparent;
    color: #9ca3af;
    font-size: 0.9rem;
}

body.theme-dark .nav-tabs .nav-link {
    background-color: transparent;
}

body.theme-light .nav-tabs .nav-link {
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: #0ea5e9;
}

.nav-tabs .nav-link.active {
    color: #0ea5e9;
    border-color: transparent;
    border-bottom: 2px solid #0ea5e9;
    background-color: transparent;
}

/* Form controls */
.form-control,
.form-select {
    border-radius: 0.6rem;
    border-color: rgba(148, 163, 184, 0.55);
    background-clip: padding-box;
}

body.theme-dark .form-control,
body.theme-dark .form-select {
    background-color: #020617;
    color: #e5e7eb;
}

body.theme-light .form-control,
body.theme-light .form-select {
    background-color: #ffffff;
    color: #111827;
}

.form-control:focus,
.form-select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

/* Modal */
.modal-content {
    border-radius: 1rem;
    border-color: rgba(148, 163, 184, 0.55);
}

body.theme-dark .modal-content {
    background-color: #020617;
    color: #e5e7eb;
}

body.theme-light .modal-content {
    background-color: #ffffff;
    color: #111827;
}

.modal-header {
    border-bottom-color: rgba(148, 163, 184, 0.4);
}

.modal-footer {
    border-top-color: rgba(148, 163, 184, 0.4);
}

/* Badge stato mercato */
body.theme-dark #marketStatus .badge.bg-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

body.theme-dark #marketStatus .badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

body.theme-light #marketStatus .badge.bg-success,
body.theme-light #marketStatus .badge.bg-danger {
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.15);
}

/* Utility testi */
.text-muted {
    color: #9ca3af !important;
}

body.theme-light .text-muted {
    color: #6b7280 !important;
}


