/* ═══════════════════════════════════════════════
   PATENTINO SOCIAL — Tema completo
   viola #5B2D8E · arancio #FF6B35 · Poppins + Inter
   ═══════════════════════════════════════════════ */

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

/* ─── BASE ─── */
body, .page-content, #page, #region-main, .pagelayout-standard #page.drawers {
    font-family: 'Inter', -apple-system, system-ui, sans-serif !important;
    color: #333333;
    background-color: #F9F7FC;
}
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5,
.navbar-brand, .card-title, .page-header-headings h1, .sectionname {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
}

/* ─── VARIABILI ─── */
:root, [data-bs-theme="light"], body {
    --bs-primary: #5B2D8E !important;
    --bs-primary-rgb: 91, 45, 142 !important;
    --bs-link-color: #5B2D8E !important;
    --bs-link-hover-color: #45206B !important;
    --bs-body-bg: #ffffff !important;
    --ps-viola: #5B2D8E;
    --ps-viola-scuro: #45206B;
    --ps-viola-chiaro: #EFE6FA;
    --ps-arancio: #FF6B35;
    --ps-bordo: #E8E2F0;
}

/* ─── NAVBAR ─── */
.navbar {
    background: #ffffff !important;
    border-bottom: 2px solid #E8E2F0 !important;
    box-shadow: 0 2px 12px rgba(91,45,142,.07) !important;
    min-height: 64px;
}
.navbar-brand, .navbar .navbar-brand {
    color: #5B2D8E !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
}
.navbar .nav-link { color: #333333 !important; font-weight: 500 !important; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: #5B2D8E !important; }
.navbar-toggler { border-color: #E8E2F0 !important; }

/* ─── BOTTONI ─── */
.btn-primary, .btn-primary:focus, button.btn-primary,
input[type="submit"].btn-primary, .btn-primary:not(:disabled):not(.disabled):active {
    background-color: #FF6B35 !important;
    border-color: #FF6B35 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.5rem !important;
    box-shadow: 0 4px 14px rgba(255,107,53,.25) !important;
    transition: all .2s !important;
}
.btn-primary:hover {
    background-color: #E85A24 !important;
    border-color: #E85A24 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255,107,53,.32) !important;
}
.btn-secondary, .btn-outline-secondary, .btn-outline-primary {
    border: 1.5px solid #5B2D8E !important;
    color: #5B2D8E !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    background: transparent !important;
}
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover {
    background-color: #5B2D8E !important;
    color: #ffffff !important;
}

/* ─── LINK ─── */
a { color: #5B2D8E !important; text-decoration: none; }
a:hover { color: #45206B !important; text-decoration: underline; }

/* ═══ LOGIN — pagina dedicata ═══ */
.pagelayout-login {
    background: linear-gradient(160deg, #F9F7FC 0%, #EFE6FA 100%) !important;
    min-height: 100vh;
}
.pagelayout-login #page {
    background: transparent !important;
}
.pagelayout-login #page-wrapper {
    background: transparent !important;
}
.pagelayout-login #region-main-box {
    padding: 20px !important;
}
.pagelayout-login #region-main {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.pagelayout-login .card,
.pagelayout-login #region-main > .card,
#page-login-index .card {
    background: #ffffff !important;
    border: 1px solid #E8E2F0 !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 50px rgba(91,45,142,.14) !important;
    padding: 32px 28px !important;
    max-width: 460px;
    margin: 0 auto;
}
.pagelayout-login .login-container {
    max-width: 460px !important;
    margin: 0 auto;
}
.pagelayout-login h1, .pagelayout-login h2,
#page-login-index h2, #page-login-index h1 {
    color: #5B2D8E !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    margin-bottom: 1.5rem !important;
}
/* Form login */
.pagelayout-login .login-form-username label,
.pagelayout-login .login-form-password label,
.pagelayout-login label {
    color: #45206B !important;
    font-weight: 600 !important;
    font-size: .92rem !important;
}
.pagelayout-login input[type="text"],
.pagelayout-login input[type="password"],
.pagelayout-login .form-control {
    border: 1.5px solid #E8E2F0 !important;
    border-radius: 10px !important;
    padding: 13px 15px !important;
    font-size: 15px !important;
    background: #fff !important;
}
.pagelayout-login input:focus, .pagelayout-login .form-control:focus {
    border-color: #5B2D8E !important;
    box-shadow: 0 0 0 4px rgba(91,45,142,.12) !important;
    outline: none !important;
}
/* Bottone accedi */
.pagelayout-login .login-form-submit .btn,
.pagelayout-login input[type="submit"],
#page-login-index .login-form-submit input[type="submit"] {
    background-color: #FF6B35 !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    padding: 14px 24px !important;
    border-radius: 11px !important;
    width: 100% !important;
    box-shadow: 0 5px 16px rgba(255,107,53,.28) !important;
    margin-top: 8px !important;
}
.pagelayout-login .login-form-submit .btn:hover {
    background-color: #E85A24 !important;
}
/* Link sotto il form */
.pagelayout-login .login-form-forgotpassword a,
.pagelayout-login .login-heading a {
    color: #5B2D8E !important;
    font-weight: 500 !important;
    font-size: .9rem !important;
}
/* Cookie notice */
.pagelayout-login .login-cookie-notice {
    font-size: .82rem !important;
    color: #6B6B6B !important;
    text-align: center;
    margin-top: 1rem;
}

/* ═══ FORM GENERICI ═══ */
.form-control, input[type="text"], input[type="password"], input[type="email"],
select.form-control, textarea.form-control, .form-select {
    border: 1.5px solid #E8E2F0 !important;
    border-radius: 9px !important;
    padding: 11px 14px !important;
    font-size: 15px !important;
    background: #fff !important;
    color: #333 !important;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: #5B2D8E !important;
    box-shadow: 0 0 0 3px rgba(91,45,142,.12) !important;
    outline: none !important;
}

/* ═══ CARD ═══ */
.card {
    border: 1px solid #E8E2F0 !important;
    border-radius: 14px !important;
    background: #fff !important;
}
.card-title, .card h4, .card h5 { color: #5B2D8E !important; }

/* ═══ SEZIONI CORSO ═══ */
.course-content .section, .course-section, .course-content .section-main {
    background: #ffffff !important;
    border: 1px solid #E8E2F0 !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    overflow: hidden;
}
.sectionname, .course-content .section .sectionname {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #5B2D8E !important;
    font-size: 1.08rem !important;
}
.course-content .current .sectionname,
.course-content .section.current .sectionname { color: #45206B !important; }
/* header della sezione corrente */
.course-content .section.current {
    border-color: #DCCBF2 !important;
    box-shadow: 0 4px 16px rgba(91,45,142,.08) !important;
}
/* attività */
.course-content .activity, .course-content li.activity {
    border-radius: 10px !important;
    padding: 4px 8px !important;
    transition: background .15s !important;
}
.course-content .activity:hover, .course-content li.activity:hover {
    background-color: #F4EEFB !important;
}
.activity .instancename, .activity .activityname {
    font-weight: 500 !important;
    color: #333 !important;
}

/* ═══ BLOCCHI ═══ */
.block, .block .card {
    border: 1px solid #E8E2F0 !important;
    border-radius: 12px !important;
    background: #fff !important;
}
.block .card-title, .block h5.card-title {
    color: #5B2D8E !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #EFE6FA !important;
    padding-bottom: 10px !important;
    font-size: 1rem !important;
}

/* ═══ BADGE / PROGRESS ═══ */
.badge.bg-primary, .badge-primary { background-color: #5B2D8E !important; color: #fff !important; }
.badge.bg-success { background-color: #2E9E5B !important; }
.progress-bar { background-color: #5B2D8E !important; }
.progress { border-radius: 999px !important; background-color: #EFE6FA !important; }

/* ═══ TAB ═══ */
.nav-tabs .nav-link.active {
    color: #5B2D8E !important;
    border-bottom: 3px solid #5B2D8E !important;
    font-weight: 700 !important;
    background: transparent !important;
}
.nav-tabs .nav-link { color: #6B6B6B !important; font-weight: 500 !important; }

/* ═══ TABELLE ═══ */
.table thead th {
    background-color: #F9F7FC !important;
    color: #5B2D8E !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #E8E2F0 !important;
}
.table td, .table th { border-color: #EFEAF6 !important; }

/* ═══ ALERT ═══ */
.alert-info {
    background-color: #EFE6FA !important;
    border: 1px solid #DCCBF2 !important;
    color: #45206B !important;
    border-radius: 12px !important;
}
.alert-success {
    background-color: #E8F7EE !important;
    border-color: #B7E4C7 !important;
    color: #1E6B42 !important;
    border-radius: 12px !important;
}

/* ═══ FOOTER ═══ */
#page-footer, footer, .footer-content {
    background-color: #5B2D8E !important;
    color: #D9CCEE !important;
    border-top: none !important;
    padding: 24px 0 !important;
}
#page-footer a, footer a, .footer-content a { color: #D9CCEE !important; }
#page-footer a:hover, footer a:hover { color: #ffffff !important; }
#page-footer .footer-content-debugging, #page-footer .logininfo { color: #B9A8D4 !important; font-size: .85rem; }

/* ═══ TITOLI PAGINA ═══ */
.page-header-headings h1 {
    color: #5B2D8E !important;
    font-weight: 800 !important;
    font-size: 1.75rem !important;
}
.breadcrumb { background: transparent !important; }
.breadcrumb-item a { color: #5B2D8E !important; }
.breadcrumb-item.active { color: #6B6B6B !important; }

/* ═══ QUIZ ═══ */
.path-mod-quiz .submitbtns input[type="submit"],
.path-mod-quiz input[type="submit"], .path-mod-quiz .btn-primary {
    background-color: #FF6B35 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    border-radius: 10px !important;
}
.que .formulation, .que .content { border-radius: 12px !important; }

/* ═══ AVATAR / PROFILO ═══ */
.userpicture { border-radius: 12px !important; }

/* ═══ DASHBOARD / BLOCCHI CORSO ═══ */
.block_myoverview .card, .dashboard-card {
    border-radius: 14px !important;
    border: 1px solid #E8E2F0 !important;
    transition: box-shadow .2s, transform .2s !important;
}
.block_myoverview .card:hover, .dashboard-card:hover {
    box-shadow: 0 10px 30px rgba(91,45,142,.12) !important;
    transform: translateY(-2px);
}
.coursename, .block_myoverview .coursename a { color: #5B2D8E !important; font-weight: 600 !important; }

/* ═══ PAGINAZIONE ═══ */
.page-link { color: #5B2D8E !important; border-color: #E8E2F0 !important; }
.page-item.active .page-link { background-color: #5B2D8E !important; border-color: #5B2D8E !important; color: #fff !important; }

/* ═══ MOBILE ═══ */
@media (max-width: 640px) {
    .navbar-brand { font-size: 1.08rem !important; }
    h1, .page-header-headings h1 { font-size: 1.45rem !important; }
    h2 { font-size: 1.25rem !important; }
    .sectionname { font-size: .98rem !important; }
    .pagelayout-login .card { padding: 24px 18px !important; border-radius: 16px !important; }
    .pagelayout-login h1, .pagelayout-login h2 { font-size: 1.35rem !important; }
}
