/*
 * UniCore | Spazio studenti
 *
 * File: assets/css/dark-natural.css
 * Funzione: Stili per dark natural.
 *
 * Copyright © 2026 Davide Giovanni Paolo Di Salvatore.
 * Proprietario di UniCore. Tutti i diritti riservati.
 *
 * Condizioni d’uso del codice e dei materiali originali in LICENSE.md.
 */

/* Palette chiara condivisa. */
html:not([data-theme="dark"], [data-backend-theme="dark"]) {
    --light-bg: #f4f7f8;
    --light-soft: #edf3f5;
    --light-ink: #182d38;
    --light-muted: #52646e;
    --light-border: #cfdee3;
    --light-focus: #14765e;
    --student-bg: var(--light-bg);
    --student-surface: #fff;
    --student-soft: var(--light-soft);
    --student-ink: var(--light-ink);
    --student-muted: var(--light-muted);
    --student-line: var(--light-border);
    --sw-bg: var(--light-bg);
    --sw-subtle: var(--light-soft);
    --sw-text: var(--light-ink);
    --sw-muted: var(--light-muted);
    --sw-border: var(--light-border);
}
html:not([data-theme="dark"], [data-backend-theme="dark"]) body:is(.front-authenticated, .auth-body) {
    background: var(--light-bg) !important;
    color: var(--light-ink);
}
html:not([data-theme="dark"]) .front-public :is(.project, .contact-hero, .contact-map-section) {
    background-color: var(--light-bg);
}
html:not([data-theme="dark"]) .front-public .contact-information,
html:not([data-theme="dark"]) .front-authenticated .student-content {
    background-color: var(--light-soft);
}
html:not([data-theme="dark"]) .auth-body .auth-card :is(.login-title, label) {
    color: var(--light-ink);
}
html:not([data-theme="dark"]) .auth-body .auth-card .login-subtitle {
    color: var(--light-muted);
}
html:not([data-theme="dark"]) .auth-body .auth-card input.form-control {
    border-color: var(--light-border) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink) !important;
}
html:not([data-theme="dark"]) .auth-body .auth-card input.form-control.errore-input {
    border-color: #b34036 !important;
}
html:not([data-theme="dark"], [data-backend-theme="dark"]) :focus-visible {
    outline: 2px solid var(--light-focus);
    outline-offset: 3px;
}
/* Tema scuro condiviso: blu ardesia e accenti menta. */
html[data-theme="dark"]{color-scheme:dark;--student-bg:#10191e;--student-surface:#19262d;--student-soft:#22323a;--student-ink:#edf4f5;--student-muted:#b5c6ca;--student-line:#3a4e58;--student-lime:#a7de90;--student-shadow:0 24px 70px rgba(0,0,0,.34);--ink:#edf4f5;--muted:#b5c6ca;--paper:#10191e;--white:#19262d;--lime:#a7de90;--line:#3a4e58;--sw-bg:#10191e;--sw-surface:#19262d;--sw-subtle:#202621;--sw-hover:#29302a;--sw-text:#edf4f5;--sw-muted:#b5c6ca;--sw-border:#3a4e58;--sw-input-border:#4b554d;--sw-accent:#a7de90;--sw-accent-hover:#c7e27f;--sw-accent-soft:#29341f;--sw-on-accent:#18200f;--sw-nav:#0c171e;--sw-nav-hover:#243942;--sw-nav-text:#edf0ec;--sw-nav-muted:#a5aea7;--sw-nav-edge:#53633a;--sw-overlay:rgba(0,0,0,.62);--sw-shadow:0 16px 48px rgba(0,0,0,.3);--sw-ring:0 0 0 3px rgba(182,214,106,.2)}
html[data-theme="dark"] body{background:#10191e;color:#edf4f5}html[data-theme="dark"] body.student-page,html[data-theme="dark"] .front-authenticated{background:#10191e!important;color:#edf4f5!important}
html[data-theme="dark"] .front-header{border-color:#31454e!important;background:#101e27!important;box-shadow:0 1px 0 rgba(255,255,255,.025)}html[data-theme="dark"] .landing-brand,html[data-theme="dark"] .front-nav a,html[data-theme="dark"] .front-account summary{color:#edf0ec!important}
html[data-theme="dark"] .front-account summary,html[data-theme="dark"] .front-account-menu{border-color:#3a4e58!important;background:#19262d!important}html[data-theme="dark"] .front-account-menu{box-shadow:0 22px 60px rgba(0,0,0,.42)!important}html[data-theme="dark"] .front-account-menu>a:not(.backend-link):hover{background:#243942!important}html[data-theme="dark"] .front-account-menu .backend-link{background:#204658!important;color:#f2f4f0!important;box-shadow:inset 3px 0 #a9c75f}
html[data-theme="dark"] .front-workspace,html[data-theme="dark"] .front-welcome,html[data-theme="dark"] .front-feed>div{border-color:#3a4e58!important;background:#19262d!important;box-shadow:0 16px 44px rgba(0,0,0,.18)!important}html[data-theme="dark"] .front-workspace>span,html[data-theme="dark"] .front-quick a,html[data-theme="dark"] .front-empty{background:#22323a!important}html[data-theme="dark"] .front-workspace>a:hover,html[data-theme="dark"] .front-feed a:hover,html[data-theme="dark"] .front-quick a:hover{background:#272e28!important}html[data-theme="dark"] .front-welcome h1 em{color:#abc960!important}html[data-theme="dark"] .front-welcome:after{background:#9dbb57!important}html[data-theme="dark"] .front-sections a:not(.has-custom-image){background:#192e39!important;border-color:#303831!important}
html[data-theme="dark"] .student-content{background:#142128!important;border-color:#31454e!important}html[data-theme="dark"] .student-card,html[data-theme="dark"] .student-create,html[data-theme="dark"] .student-search,html[data-theme="dark"] .student-empty,html[data-theme="dark"] .student-flash,html[data-theme="dark"] .profile-panel,html[data-theme="dark"] .profile-cover dl div,html[data-theme="dark"] .calendar-day,html[data-theme="dark"] .calendar-hero aside,html[data-theme="dark"] .calendar-empty,html[data-theme="dark"] .schedule-board,html[data-theme="dark"] .schedule-hero aside,html[data-theme="dark"] .twofa-card,html[data-theme="dark"] .forum-thread,html[data-theme="dark"] .thread-main,html[data-theme="dark"] .answer,html[data-theme="dark"] .reply-form{border-color:#3a4e58!important;background:#19262d!important;color:#edf4f5!important;box-shadow:none!important}
html[data-theme="dark"] .student-subnav a,html[data-theme="dark"] .schedule-table thead th,html[data-theme="dark"] .schedule-table tbody>tr>th,html[data-theme="dark"] .schedule-lesson,html[data-theme="dark"] .calendar-day>header{border-color:#3a4e58!important;background:#22323a!important}
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=color]),html[data-theme="dark"] select,html[data-theme="dark"] textarea{border-color:#566e79!important;background:#111e25!important;color:#edf4f5!important}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#a2b6bf!important}html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{border-color:#79dbbc!important;box-shadow:0 0 0 3px rgba(121,219,188,.18)!important}
html[data-theme="dark"] .site-footer{background:#0e120f!important}html[data-theme="dark"] .site-footer-logo,html[data-theme="dark"] .site-footer nav a{border-color:#333a34!important;background:#191e1b!important;color:#e9ede8!important}html[data-theme="dark"] .site-footer nav a:hover{background:#243942!important}
html[data-theme="dark"] .auth-body{background:#10191e!important}html[data-theme="dark"] .auth-body .auth-card{border-color:#3a4e58!important;background:#19262d!important;color:#edf4f5!important;box-shadow:0 25px 75px rgba(0,0,0,.28)!important}html[data-theme="dark"] .auth-body .auth-card input:not([type=hidden]){border-color:#566e79!important;background:#111e25!important;color:#edf4f5!important}html[data-theme="dark"] .auth-body .auth-password-toggle,html[data-theme="dark"] .auth-body .remember-option{border-color:#3b443d!important;background:#232923!important;color:#dce1dc!important}
html[data-theme="dark"] .sidebar{background:#0c171e!important;border-color:#53633a!important}html[data-theme="dark"] .main,html[data-theme="dark"] .topbar,html[data-theme="dark"] .page-content{background:#10191e!important;color:#edf4f5!important}html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .settings-card,html[data-theme="dark"] .content-card{border-color:#3a4e58!important;background:#19262d!important;color:#edf4f5!important}
html[data-backend-theme="dark"]{color-scheme:dark;--admin-bg:#10191e;--admin-surface:#19262d;--admin-soft:#22323a;--admin-text:#edf4f5;--admin-muted:#b5c6ca;--admin-line:#3a4e58;--admin-accent:#a7de90;--admin-shadow:0 28px 85px rgba(0,0,0,.42);--ink:#edf4f5;--muted:#b5c6ca;--paper:#10191e;--white:#19262d;--lime:#a7de90;--line:#3a4e58}html[data-backend-theme="dark"] body{background:#10191e!important;color:#edf4f5!important}html[data-backend-theme="dark"] .backend-top{background:#0c171e!important;box-shadow:0 1px 0 rgba(255,255,255,.05),0 16px 38px rgba(0,0,0,.22)}html[data-backend-theme="dark"] .backend-top nav a{color:#b9c1ba!important}html[data-backend-theme="dark"] .backend-top nav a:hover,html[data-backend-theme="dark"] .backend-top nav a.active{background:#243942!important;color:#f2f4f0!important}
html[data-backend-theme="dark"] .admin-module-grid>a,html[data-backend-theme="dark"] .admin-list article,html[data-backend-theme="dark"] .admin-empty,html[data-backend-theme="dark"] .admin-day,html[data-backend-theme="dark"] .admin-lesson,html[data-backend-theme="dark"] .admin-entity,html[data-backend-theme="dark"] .wm-panel,html[data-backend-theme="dark"] .wm-list,html[data-backend-theme="dark"] .wm-role,html[data-backend-theme="dark"] .user-card,html[data-backend-theme="dark"] .user-detail-hero,html[data-backend-theme="dark"] .user-data-grid>article,html[data-backend-theme="dark"] .user-stats article,html[data-backend-theme="dark"] .branding-form>section,html[data-backend-theme="dark"] .branding-form>footer,html[data-backend-theme="dark"] .schedule-admin-table-wrap{border-color:#3a4e58!important;background:#19262d!important;color:#edf4f5!important;box-shadow:none!important}
html[data-backend-theme="dark"] .schedule-admin-table th,html[data-backend-theme="dark"] .home-card-image,html[data-backend-theme="dark"] .permission,html[data-backend-theme="dark"] .system-note{border-color:#3a4e58!important;background:#22323a!important;color:#e9ede8!important}html[data-backend-theme="dark"] .schedule-admin-table td{border-color:#3a4e58!important;color:#b5c6ca!important}
html[data-backend-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=color]),html[data-backend-theme="dark"] select,html[data-backend-theme="dark"] textarea{border-color:#566e79!important;background:#111e25!important;color:#edf4f5!important}html[data-backend-theme="dark"] input::placeholder,html[data-backend-theme="dark"] textarea::placeholder{color:#a2b6bf!important}html[data-backend-theme="dark"] input:focus,html[data-backend-theme="dark"] select:focus,html[data-backend-theme="dark"] textarea:focus{border-color:#79dbbc!important;box-shadow:0 0 0 3px rgba(121,219,188,.18)!important}
html[data-backend-theme="dark"] .admin-create[open],html[data-backend-theme="dark"] .admin-entity[open],html[data-backend-theme="dark"] .admin-lesson[open],html[data-backend-theme="dark"] .admin-create[open]>summary,html[data-backend-theme="dark"] .admin-entity[open]>summary,html[data-backend-theme="dark"] .admin-lesson[open]>summary{border-color:#3a4e58!important;background:#19262d!important;color:#edf4f5!important}html[data-backend-theme="dark"] .admin-modal-open::before{background:rgba(4,7,5,.72)!important}html[data-backend-theme="dark"] .backend-exit{border-color:#8fa84f!important;background:#aeca60!important;color:#17200f!important}html[data-backend-theme="dark"] .backend-exit:hover{background:#bdd873!important;color:#17200f!important}
html[data-theme="dark"] *,html[data-backend-theme="dark"] *{scrollbar-color:#465047 #111e25}
/* Il footer conserva la propria identità blu anche nel tema scuro. */
html[data-theme="dark"] body footer.site-footer{background:#102b40!important;color:#f5f9fc!important}
html[data-theme="dark"] .site-footer .site-footer-logo{border-color:rgba(255,255,255,.2)!important;background:#fff!important;color:#14344b!important}
html[data-theme="dark"] .site-footer .site-footer-menu nav a,html[data-theme="dark"] .site-footer .site-footer-navigation nav a{border:0!important;border-bottom:0!important;background:transparent!important;color:#cbd9e4!important;box-shadow:none!important}
html[data-theme="dark"] .site-footer .site-footer-menu nav a:hover,html[data-theme="dark"] .site-footer .site-footer-navigation nav a:hover{background:transparent!important;color:#73e0b6!important}
html[data-theme="dark"] .site-footer .site-footer-email{border:0!important;background:transparent!important;color:#fff!important}
html[data-theme="dark"] .site-footer .site-footer-bottom{border-color:rgba(255,255,255,.15)!important}
html[data-theme="dark"] .site-footer .site-footer-copy{color:#a9bfd3!important}

html:is([data-theme="dark"], [data-backend-theme="dark"]) {
    --dark-panel: #19262d;
    --dark-raised: #22353f;
    --dark-border: #3a4e58;
    --dark-text: #edf4f5;
    --dark-muted: #b5c6ca;
    --dark-focus: #79dbbc;
    background: #10191e;
}
html:is([data-theme="dark"], [data-backend-theme="dark"]) :focus-visible {
    outline: 2px solid var(--dark-focus);
    outline-offset: 3px;
}
html[data-theme="dark"] .front-account-menu .backend-link :is(strong, small) {
    color: var(--dark-text) !important;
}
html[data-theme="dark"] :is(.communications-hero aside, .subjects-stats article, .subject-refresh-hero) {
    background: #183747 !important;
    border-color: #426073 !important;
    color: var(--dark-text) !important;
}
html[data-theme="dark"] :is(.communications-hero aside, .subjects-stats article, .subject-refresh-hero) :is(strong, span, h1, p) {
    color: inherit !important;
}
html[data-theme="dark"] :is(.forum-categories, .forum-compose, .communication-featured, .communication-card, .subject-card, .subject-refresh-panel, .teacher-card, .schedule-card) {
    background: var(--dark-panel);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html[data-theme="dark"] .forum-categories a.active {
    background: var(--dark-raised) !important;
    color: var(--dark-text) !important;
}
html[data-theme="dark"] .forum-categories a.active :is(strong, small) {
    color: inherit !important;
}
html[data-theme="dark"] .site-footer nav a {
    background: transparent !important;
    color: #dbe8ef !important;
}
html[data-theme="dark"] .site-footer nav a:hover {
    color: var(--dark-focus) !important;
}
html[data-theme="dark"] .front-public :is(main#top, .project, .contact-hero, .contact-map-section) {
    background: #10191e !important;
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html[data-theme="dark"] .front-public :is(.contact-information, .project-facts li) {
    background: var(--dark-raised) !important;
    border-color: var(--dark-border) !important;
}
html[data-theme="dark"] .front-public :is(.feature-grid>article, .contact-card, .contact-hero-board, .contact-note, .contact-map-board) {
    background: var(--dark-panel) !important;
    color: var(--dark-text) !important;
}
html[data-theme="dark"] .front-public :is(.hero-copy, .project, .contact-card, .contact-map-copy) :is(p, li) {
    color: var(--dark-muted);
}
html[data-theme="dark"] .front-public :is(.hero-copy h1 em, .hero-copy .eyebrow, .project .eyebrow, .contact-card a, .contact-map-copy a, .text-link, .feature-action) {
    color: var(--dark-focus) !important;
}
html[data-backend-theme="dark"] .backend-top .backend-nav-menu,
html[data-backend-theme="dark"] :is(dialog, .admin-dashboard-group, .site-update-release) {
    background: var(--dark-panel);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html[data-theme="dark"] .auth-body .auth-card input.form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #111e25 inset !important;
    -webkit-text-fill-color: var(--dark-text) !important;
    caret-color: var(--dark-focus) !important;
}
