/* ===========================
   Tema Converter (solo CSS)
   =========================== */

/* Palette */
:root{
    --bg: #1e1d2b;         /* SFONDO */
    --brand: #8c52ff;      /* LOGO E PULSANTI */
    --text: #efedff;       /* SCRITTE */
    --footer: #262537;     /* SFONDO FOOTER */

    /* tonalità testo su dark */
    --text-soft: rgba(239,237,255,.88);
    --text-dim:  rgba(239,237,255,.72);

    /* Allinea le var di Bootstrap al tema dark */
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-card-color: var(--text);
}

/* Base */
html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
}
a { color: var(--text); text-decoration: none; }
a:hover { opacity: .9; }

/* Navbar + logo */
.app-navbar {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;   /* angoli morbidi per loghi quadrati */
    object-fit: cover;    /* riempie senza deformare */
}

/* Footer */
.footer {
    background: var(--footer);
    color: var(--text);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Bottoni primari (override Bootstrap) */
.btn-primary {
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
}
.btn-primary:hover { filter: brightness(1.05); }

/* Bottoni outline chiari */
.btn-outline-light {
    color: var(--text);
    border-color: rgba(255,255,255,.35);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,.08);
}

/* Card scura soft */
.card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

/* Forza contrasto titoli/testi nelle card (specie quelle feature) */
.feature.card,
.feature.card h1,
.feature.card h2,
.feature.card h3,
.feature.card h4,
.feature.card h5,
.feature.card h6 {
    color: var(--text) !important;
}
.feature.card p,
.feature.card .small,
.card .small {
    color: var(--text-soft) !important;
}

/* Dropdown scuri */
.dropdown-menu-dark {
    --bs-dropdown-bg: #2b2a3b;
    --bs-dropdown-color: var(--text);
    --bs-dropdown-link-hover-bg: #3a394c;
    --bs-dropdown-link-active-bg: var(--brand);
}

/* Select2 tema scuro */
.select2-container--default .select2-selection--single {
    background-color: #2b2a3b;
    border: 1px solid rgba(255,255,255,.15);
    color: var(--text);
    height: 38px;
    display: flex; align-items: center;
}
.select2-container--default .select2-selection__rendered {
    color: var(--text);
    line-height: 38px;
}
.select2-container--default .select2-selection__arrow { height: 38px; }
.select2-dropdown {
    background-color: #2b2a3b;
    border-color: rgba(255,255,255,.15);
    color: var(--text);
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--brand);
    color: #fff;
}

/* ===== Landing minimal ===== */
.hero {
    padding: 56px 0 24px;
    text-align: center;
}
.hero-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.hero h1,
.hero p { color: var(--text); }
.hero .lead {
    max-width: 760px;
    margin: 0 auto 16px;
    color: var(--text-soft);
}

.feature.card { transition: transform .12s ease; }
.feature.card:hover { transform: translateY(-2px); }

.badge-soft {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(140,82,255,.15);
    color: #d7c7ff;
    font-size: .8rem;
}

/* Utilità testo su dark */
.text-muted { color: var(--text-dim) !important; }
.text-soft  { color: var(--text-soft) !important; }
.text-muted a,
.text-soft a { color: var(--text) !important; }

/* ===========================
   Input file customizzato
   =========================== */

/* Bottone "Sfoglia" coerente con il tema */
input[type="file"]::file-selector-button {
    color: #fff;
    background-color: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: filter .15s ease;
}
input[type="file"]::file-selector-button:hover {
    filter: brightness(1.1);
}

/* Compatibilità WebKit (Safari, Chrome vecchi) */
input[type="file"]::-webkit-file-upload-button {
    color: #fff;
    background-color: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: filter .15s ease;
}
input[type="file"]::-webkit-file-upload-button:hover {
    filter: brightness(1.1);
}
