﻿body {
    background: #0b1118;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.btn {
    border-radius: 8px;
}

/* MAIN */
.dg-main {
    padding: 0;
}

    .dg-main > .container {
        max-width: 100% !important;
        padding-left: 0;
        padding-right: 0;
    }

/* MENU */
.top-header {
    position: fixed;
    top: 14px;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: all .3s ease;
}

.top-menu {
    width: min(900px, calc(100% - 180px));
    margin: 0 auto;
    background: #050505;
    border: 1px solid rgba(211 81 29);
    border-radius: 32px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 0 30px rgba(0,0,0,.45);
}

.top-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
}

    .top-logo:hover {
        color: #ffffff;
    }
.top-logo-text {
    color: #ffffff;
    font-weight: 900;
    font-size: 18px;
    text-decoration: none;
    /*border: 1px solid #ffffff;*/
    border-radius: 4px;
    padding: 4px 9px;
    white-space: nowrap;
}

.top-logo-text:hover {
    color: #ffffff;
}
.floating-logo {
    position: fixed;
    top: 6px;
    left: 45px;
    z-index: 10000;
}

.floating-logo-img {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 35px rgba(255,106,0,.55);
}
.top-menu-links {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
}

.top-menu-links .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 34px;
    margin: 0;
    padding: 0;
}

.top-menu .nav-item {
    display: flex;
    align-items: center;
}

.top-menu .nav-link {
    color: #ffffff !important;
    font-weight: 700;
    padding: 8px 0 !important;
    margin: 0 !important;
    position: relative;
    white-space: nowrap;
}

    .top-menu .nav-link:hover,
    .top-menu .nav-link.active {
        color: #ffffff !important;
    }

        .top-menu .nav-link.active::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 2px;
            width: 100%;
            height: 2px;
            background: #ff6a00;
        }

.login-btn {
    background: #dd0f26;
    color: #000000 !important;
    border-radius: 8px;
    padding: 10px 20px !important;
    font-weight: 900;
}

    .login-btn:hover {
        background: #af3030;
        color: #000000 !important;
    }

.top-toggler {
    display: none;
}

/* HERO */
.home-hero-officina {
    width: 100%;
    min-height: 620px;
    padding: 190px 0 70px 0;
    color: #ffffff;
    background: linear-gradient( 90deg, rgba(5,10,15,.92) 0%, rgba(8,16,24,.78) 45%, rgba(15,20,30,.55) 100% ), url('/images/officina-hero.jpg');
    background-size: cover;
    background-position: center;
}

    .home-hero-officina .container {
        max-width: 1200px;
    }

.home-badge,
.section-label {
    display: inline-block;
    background: #dd0f26;
    color: #101820;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 800;
    margin-bottom: 20px;
}

.home-hero-officina h1 {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.home-hero-officina p {
    font-size: 19px;
    color: #e5e7eb;
    max-width: 680px;
    line-height: 1.7;
}

.home-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 35px;
}

.btn-home-primary {
    background: #dd0f26;
    color: #101820;
    border-radius: 40px;
    padding: 14px 30px;
    font-weight: 900;
    border: none;
}

    .btn-home-primary:hover {
        background: #f5c400;
        color: #101820;
    }

.btn-home-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 40px;
    padding: 14px 30px;
    font-weight: 900;
}

    .btn-home-secondary:hover {
        background: #ffffff;
        color: #101820;
    }

.home-card {
    background: #ffffff;
    color: #101820;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 20px 45px rgba(0,0,0,.35);
}

.home-card-label {
    display: block;
    margin-bottom: 10px;
    color: #101820;
}

.home-card h3 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 15px;
}

.home-card p {
    color: #52606d;
    line-height: 1.7;
}

.home-card-link {
    color: #006cff;
    font-weight: 700;
}

/* SERVIZI */
.home-services {
    padding: 90px 0;
    background: #111821;
}

    .home-services .container,
    .home-about .container,
    .home-strip .container,
    .home-cta .container {
        max-width: 1200px;
    }

    .home-services h2,
    .home-about h2,
    .home-cta h2 {
        font-size: 42px;
        font-weight: 900;
    }

    .home-services p,
    .home-about p,
    .home-cta p {
        color: #c5d1dc;
        line-height: 1.7;
    }

.service-box {
    background: #1a2430;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 24px;
    padding: 35px;
    height: 100%;
    box-shadow: 0 10px 35px rgba(0,0,0,.08);
}

.service-icon {
    font-size: 42px;
    margin-bottom: 18px;
}

.service-box h3 {
    font-size: 23px;
    font-weight: 900;
    color: #ffffff;
}

.service-box p {
    color: #c5d1dc;
}

/* CHI SIAMO */
.home-about {
    padding: 90px 0;
    background: #0f1720;
}

.about-image {
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

.about-list {
    list-style: none;
    padding: 0;
    margin-top: 25px;
}

    .about-list li {
        padding: 10px 0;
        font-weight: 700;
    }

        .about-list li::before {
            content: "✓";
            color: #ffcc00;
            font-weight: 900;
            margin-right: 10px;
        }

/* STRIP */
.home-strip {
    padding: 55px 0;
    background: #101820;
    color: #ffffff;
}

.strip-item {
    background: rgba(255,255,255,.06);
    border-radius: 18px;
    padding: 26px;
}

    .strip-item strong {
        display: block;
        font-size: 22px;
        margin-bottom: 8px;
    }

    .strip-item span {
        color: #d9e2ec;
    }

/* CTA */
.home-cta {
    background: linear-gradient(135deg, #111821 0%, #0b1118 100%);
    color: #ffffff;
    padding: 90px 0;
    border-top: 1px solid rgba(255,255,255,.05);
}

    .home-cta p {
        font-size: 18px;
        margin-bottom: 30px;
    }

/* FOOTER */
.dg-footer {
    background: #05080c;
    color: #ffffff;
    text-align: center;
    padding: 24px 0;
}

    .dg-footer p {
        margin: 0;
    }

/* TABELLE */
.table {
    background: #101820;
    border-radius: 14px;
    overflow: hidden;
    color: #ffffff !important;
}

/* RESPONSIVE */
@media (max-width: 991px) {

    .top-menu {
        width: calc(100% - 24px);
        border-radius: 22px;
        padding: 9px 14px;
    }

    .top-menu-links {
        justify-content: flex-end;
        margin-top: 0;
    }

        .top-menu-links .navbar-nav {
            flex-direction: row !important;
            align-items: center !important;
            gap: 18px;
        }

    .top-menu .nav-link {
        font-size: 14px;
    }

    .login-btn {
        padding: 8px 14px !important;
    }

    .home-hero-officina {
        min-height: auto;
        padding: 140px 0 60px 0;
    }

        .home-hero-officina h1 {
            font-size: 38px;
        }

    .home-card {
        margin-top: 35px;
    }

    .home-services h2,
    .home-about h2,
    .home-cta h2 {
        font-size: 32px;
    }
}

@media (max-width: 576px) {

    .home-hero-officina h1 {
        font-size: 34px;
    }

    .home-hero-officina p {
        font-size: 17px;
    }

    .home-services,
    .home-about,
    .home-cta {
        padding: 60px 0;
    }
}
/* LOGIN DGMOTOR */

.login-page-wrapper {
    min-height: calc(100vh - 140px);
    padding-top: 180px;
    padding-bottom: 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #0b1118;
}

.login-card-dg {
    width: 100%;
    max-width: 430px;
    background: #111923;
    border: 1px solid #af3030;
    border-radius: 18px;
    box-shadow: 0 0 35px rgba(242, 106, 33, 0.25);
    overflow: hidden;
}

.login-card-header {
    background: linear-gradient(135deg, #0b1118, #182331);
    padding: 26px 28px 18px;
    text-align: center;
    border-bottom: 1px solid rgba(242, 106, 33, 0.4);
}

    .login-card-header h4 {
        color: #ffffff;
        font-size: 25px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .login-card-header p {
        color: #c9d1d9;
        font-size: 14px;
        margin: 0;
    }

.login-card-body {
    padding: 28px;
}

.login-label {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-input {
    height: 46px;
    background: #ffffff;
    color: #111923;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
}

    .login-input:focus {
        border-color: #af3030;
        box-shadow: 0 0 0 0.2rem rgba(242, 106, 33, 0.25);
    }

.login-submit {
    width: 100%;
    height: 46px;
    background: #af3030;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
}

    .login-submit:hover {
        background: #dd0f26;
        color: #ffffff;
    }
/* SPAZIO PER PAGINE INTERNE */
.dg-main {
    padding-top: 150px;
    min-height: calc(100vh - 110px);
}

    .dg-main > .container {
        max-width: 1200px;
    }

    /* Evita che tabelle e titoli finiscano sotto il menu */
    .dg-main h1,
    .dg-main h2,
    .dg-main h3 {
        margin-top: 0;
        color: #ffffff;
    }

    .dg-main table {
        margin-top: 20px;
    }
/* HEADER PAGINE GESTIONE */

.page-header-dg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

    .page-header-dg h1 {
        color: #ffffff;
        font-size: 48px;
        font-weight: 700;
        margin: 0;
    }
/* FORM DARK DGMOTOR */

.dg-form-card {
    background: linear-gradient(145deg, #131d2b, #182434);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.dg-form-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 25px;
}

.dg-label {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
}

.dg-input,
.dg-input.form-control,
.dg-input.form-select {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
    border-radius: 12px;
    min-height: 46px;
}

    .dg-input:focus,
    .dg-input.form-control:focus,
    .dg-input.form-select:focus {
        background: rgba(255,255,255,0.06);
        border-color: #af3030;
        color: #ffffff;
        box-shadow: 0 0 0 0.2rem rgba(242,106,33,.2);
    }

    .dg-input option {
        background: #182434;
        color: #ffffff;
    }

.dg-table-dark {
    background: linear-gradient(145deg, #131d2b, #182434);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

    .dg-table-dark .table {
        margin-bottom: 0;
        color: #ffffff;
    }

        .dg-table-dark .table th {
            background: rgba(255,255,255,0.05);
            color: #ffffff;
            border-color: rgba(255,255,255,0.08);
        }

        .dg-table-dark .table td {
            background: transparent;
            border-color: rgba(255,255,255,0.06);
        }

    .dg-table-dark input {
        background: rgba(255,255,255,0.04) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        color: #ffffff !important;
    }

        .dg-table-dark input:focus {
            border-color: #af3030 !important;
            box-shadow: 0 0 0 0.2rem rgba(242,106,33,.2) !important;
        }

.dg-checkbox-area {
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.05);
}

    .dg-checkbox-area label {
        color: #ffffff;
    }

.dg-section-header {
    background: linear-gradient(90deg, #1d2a3a, #24364d);
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
/* MODALI DARK */

.modal-content {
    background: linear-gradient(145deg, #131d2b, #182434);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.modal-title {
    color: #ffffff;
}

.btn-close {
    filter: invert(1);
}
/* TABELLA PEZZI DI RICAMBIO DARK */

.dg-parts-card {
    padding: 0;
    overflow: hidden;
}

.dg-parts-table-wrap {
    padding: 18px;
    background: linear-gradient(145deg, #131d2b, #182434);
}

.dg-parts-table {
    width: 100%;
    margin-bottom: 0;
    color: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
}

    .dg-parts-table thead th {
        background: rgba(255,255,255,0.04) !important;
        color: #ffffff !important;
        border-color: rgba(255,255,255,0.08) !important;
        font-weight: 700;
        padding: 14px 12px;
    }

    .dg-parts-table tbody td {
        background: rgba(255,255,255,0.025) !important;
        border-color: rgba(255,255,255,0.07) !important;
        padding: 10px 12px;
    }

    .dg-parts-table tbody tr:nth-child(even) td {
        background: rgba(255,255,255,0.04) !important;
    }

    .dg-parts-table .dg-input {
        background: rgba(8,14,22,0.85) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255,255,255,0.14) !important;
    }

        .dg-parts-table .dg-input:focus {
            border-color: #af3030 !important;
            box-shadow: 0 0 0 0.2rem rgba(242,106,33,.22) !important;
        }
    /* FIX DEFINITIVO TABELLA PEZZI - OVERRIDE BOOTSTRAP */

    .dg-parts-table,
    .dg-parts-table thead,
    .dg-parts-table tbody,
    .dg-parts-table tr,
    .dg-parts-table th,
    .dg-parts-table td {
        background-color: transparent !important;
        color: #ffffff !important;
        --bs-table-bg: transparent !important;
        --bs-table-color: #ffffff !important;
        --bs-table-striped-bg: rgba(255,255,255,0.035) !important;
        --bs-table-striped-color: #ffffff !important;
        --bs-table-border-color: rgba(255,255,255,0.10) !important;
    }

.dg-parts-table-wrap {
    background: linear-gradient(145deg, #131d2b, #182434) !important;
}

.dg-parts-table thead th {
    background: rgba(255,255,255,0.06) !important;
    color: #ffffff !important;
}

.dg-parts-table tbody td {
    background: rgba(255,255,255,0.025) !important;
}

.dg-parts-table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.045) !important;
}
/* BOTTONI AZIONI FORM */

.dg-form-actions {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 50px;
}

.dg-action-save,
.dg-action-save:visited {
    background: #af3030 !important;
    color: #ffffff !important;
    border: 1px solid #af3030 !important;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
    opacity: 1 !important;
}

    .dg-action-save:hover {
        background: #dd0f26 !important;
        color: #ffffff !important;
    }

.dg-action-back,
.dg-action-back:visited {
    background: #223044 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
    opacity: 1 !important;
}

    .dg-action-back:hover {
        background: #2e4059 !important;
        color: #ffffff !important;
    }
.dg-form-actions {
    display: flex !important;
    gap: 16px !important;
    margin-top: 28px !important;
    margin-bottom: 60px !important;
    position: relative !important;
    z-index: 5 !important;
}

.dg-action-save {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 150px !important;
    background: #af3030 !important;
    color: #ffffff !important;
    border: 1px solid #af3030 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
}

    .dg-action-save:hover {
        background: #dd0f26 !important;
        color: #ffffff !important;
    }

.dg-action-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 150px !important;
    background: #223044 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
}

    .dg-action-back:hover {
        background: #2e4059 !important;
        color: #ffffff !important;
    }
/* FIX TABLE-STRIPED DARK */

.table.table-striped {
    --bs-table-bg: transparent;
    --bs-table-color: #ffffff;
    --bs-table-striped-bg: rgba(255,255,255,0.06);
    --bs-table-striped-color: #ffffff;
    --bs-table-border-color: rgba(255,255,255,0.10);
    color: #ffffff !important;
}

    .table.table-striped > tbody > tr:nth-of-type(odd) > * {
        background-color: rgba(255,255,255,0.03) !important;
        color: #ffffff !important;
    }

    .table.table-striped > tbody > tr:nth-of-type(even) > * {
        background-color: rgba(255,255,255,0.07) !important;
        color: #ffffff !important;
    }

    .table.table-striped td,
    .table.table-striped th {
        border-color: rgba(255,255,255,0.10) !important;
        color: #ffffff !important;
    }
    /* mobile*/
@media (max-width: 768px) {

    .navbar {
        position: relative;
        padding-top: 90px;
        min-height: 170px;
        align-items: flex-start;
    }

    .navbar-brand,
    .dg-logo,
    .logo-dgmotor {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
        max-width: 120px;
        height: auto;
    }

    .navbar-collapse {
        width: 100%;
        background: #000;
        padding: 10px 0;
        z-index: 10;
    }

    .navbar-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

        .navbar-nav .nav-item {
            width: 100%;
        }

        .navbar-nav .nav-link {
            width: 100%;
            padding: 10px 14px;
            white-space: nowrap;
        }

    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        background: #222;
        border: none;
        transform: none !important;
    }

        .dropdown-menu .dropdown-item {
            color: #fff;
            white-space: normal;
            padding: 10px 18px;
        }

            .dropdown-menu .dropdown-item:hover {
                background: #e50914;
                color: #fff;
            }
}
@media (max-width: 991px) {

    .top-header {
        overflow: visible;
    }

    .top-menu {
        overflow: visible;
    }

    .top-menu-links {
        overflow: visible;
    }

    .navbar-nav {
        position: relative;
    }

    .nav-item.dropdown {
        position: static;
    }

        .nav-item.dropdown .dropdown-menu {
            position: absolute !important;
            left: 0 !important;
            right: auto !important;
            top: 100% !important;
            transform: none !important;
            width: calc(100vw - 60px);
            max-width: 320px;
            min-width: 220px;
            margin-top: 8px;
            background: #222;
            border-radius: 6px;
            z-index: 9999;
        }

    .dropdown-menu .dropdown-item {
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
        padding: 10px 16px;
    }
}
/* FIX PAGINE INTERNE MOBILE - SPAZIO SOTTO MENU */
@media (max-width: 768px) {

    .dg-main {
        padding-top: 230px !important;
    }

        .dg-main > .container {
            padding-left: 14px !important;
            padding-right: 14px !important;
        }
}
@media (max-width: 768px) {

    .dg-checkbox-area {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 8px;
    }

        .dg-checkbox-area > div:first-child {
            display: flex;
            align-items: center;
            flex: 1;
            min-width: 0;
        }

            .dg-checkbox-area > div:first-child label {
                white-space: nowrap;
                margin-bottom: 0;
                font-size: 14px;
            }

        .dg-checkbox-area > div:last-child {
            display: flex;
            align-items: center;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .dg-checkbox-area .form-check-input {
            margin-top: 0;
        }
}