﻿:root {
    --marketing-green: #1b5e20;
    --marketing-green-dark: #154618;
    --marketing-yellow: #ffc107;
    --marketing-red: #dc3545;
    --marketing-gray: #6c757d;
    --marketing-white: #ffffff;
    --marketing-border: #e5e5e5;
}
html,
body {
    height: 100%;
    margin: 0;
    background: #f3efdc;
}
/* =====================================================
   ASTRA - MARKETING
   ===================================================== */

.marketing-page {
    padding-top: 20px;
}

/* =====================================================
   Titoli
   ===================================================== */

.marketing-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--marketing-green);
    margin-bottom: 25px;
}

.marketing-subtitle {
    color: #666;
    margin-bottom: 20px;
}

/* =====================================================
   Barra filtri
   ===================================================== */

.marketing-toolbar {
    background: var(--marketing-white);
    border: 1px solid var(--marketing-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

/* =====================================================
   Card statistiche
   ===================================================== */

.marketing-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.marketing-stat-card {
    background: var(--marketing-white);
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.marketing-stat-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.marketing-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--marketing-green);
}

/* =====================================================
   Tabelle
   ===================================================== */

.marketing-table {
    background: var(--marketing-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

    .marketing-table table {
        margin-bottom: 0;
    }

    .marketing-table thead {
        background: var(--marketing-green);
        color: white;
    }

        .marketing-table thead th {
            border: none;
            padding: 14px;
            font-weight: 600;
        }

    .marketing-table tbody td {
        vertical-align: middle;
        padding: 12px;
    }

/* =====================================================
   Badge stati mailing
   ===================================================== */

.badge-attivo {
    display: inline-block;
    background: #198754;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.badge-attesa {
    display: inline-block;
    background: var(--marketing-yellow);
    color: #212529;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.badge-bloccato {
    display: inline-block;
    background: var(--marketing-red);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.badge-errore {
    display: inline-block;
    background: var(--marketing-gray);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

/* =====================================================
   Manifestazioni di interesse
   ===================================================== */

.badge-contattato {
    display: inline-block;
    background: #198754;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-non-contattato {
    display: inline-block;
    background: var(--marketing-red);
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* =====================================================
   Bottoni
   ===================================================== */

.btn-marketing {
    background: var(--marketing-green);
    color: white;
    border: none;
}

    .btn-marketing:hover {
        background: var(--marketing-green-dark);
        color: white;
    }

/* =====================================================
   Card campagna
   ===================================================== */

.campagna-card {
    background: var(--marketing-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

    .campagna-card img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

.campagna-body {
    padding: 15px;
}

.campagna-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--marketing-green);
}
.marketing-card {
    background: #f8f8f8;
    border-radius: 18px;
    padding: 25px;
    margin: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.marketing-header {
    margin-bottom: 25px;
}

/* =====================================================
   Toolbar
   ===================================================== */

.marketing-toolbar {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 25px;
}

/* =====================================================
   Griglia standard Marketing
   ===================================================== */

.marketing-grid {
    margin-bottom: 0;
}

    .marketing-grid thead th {
        background: #cfd3d7 !important;
        color: #222;
        font-weight: 700;
        border: none;
        padding: 14px 10px;
        vertical-align: middle;
    }

    .marketing-grid tbody tr:nth-child(odd) td {
        background: #f9f9f9;
    }

    .marketing-grid tbody tr:nth-child(even) td {
        background: #edf3f4;
    }

    .marketing-grid tbody tr:hover td {
        background: #dfeee2 !important;
    }

    .marketing-grid tbody td {
        padding-top: 14px;
        padding-bottom: 14px;
        vertical-align: middle;
    }

/* =====================================================
   Bottone Apri
   ===================================================== */

.btn-apri {
    display: inline-block;
    min-width: 90px;
    padding: 8px 16px;
    background: var(--marketing-green);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    transition: .2s;
}

    .btn-apri:hover {
        background: var(--marketing-green-dark);
        color: white;
        text-decoration: none;
    }

/* =====================================================
   Uniformità modulo Marketing
   ===================================================== */

.marketing-page {
    padding: 0;
}

.marketing-title {
    margin-bottom: 0;
}

.btn-marketing {
    font-weight: 600;
}

.form-label {
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

#txtTesto {
    min-height: 350px;
}
.form-label {
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.form-control-lg {
    font-size: 1.1rem;
}
/* =====================================================
   CAMPAGNA EDITOR
   ===================================================== */

.campagna-editor {
    width: 100%;
    max-width: none;
    margin: 0;
}

.editor-label {
    display: block;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    color: #444;
    margin-bottom: 12px;
}



.date-viaggio {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.editor-data {
    width: 220px;
}

.freccia-date {
    font-size: 24px;
    font-weight: bold;
    color: #666;
}


    .upload-area input[type=file] {
        max-width: 500px;
        margin: 0 auto;
    }

.preview-foto {
    text-align: center;
    margin: 5px 0;
}

    .preview-foto img {
        max-width: 700px;
        max-height: 400px;
        width: auto;
    }


/* Menu Marketing */

.marketing-master-menu a {
    color: white !important;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
}

    .marketing-master-menu a:hover {
        background: rgba(255,255,255,0.15);
        color: white !important;
    }
/* ==========================================
   CAMPAGNA EDITOR
   ========================================== */

.campagna-editor {
    width: 100%;
    max-width: none;
    margin: 0;
}

.editor-label {
    display: block;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: var(--marketing-green);
    margin-bottom: 12px;
}

.editor-titolo {
    max-width: 700px;
    margin: 0 auto;
    height: 50px;
    font-size: 20px;
}

.date-viaggio {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.editor-data {
    width: 260px;
}

.freccia-date {
    font-size: 28px;
    font-weight: bold;
    color: var(--marketing-green);
}

.upload-area {
    max-width: 700px;
    margin: 0 auto 30px auto;
    text-align: center;
    
}

.preview-foto {
    text-align: center;
    margin-bottom: 40px;
}

    .preview-foto img {
        max-width: 700px;
        max-height: 400px;
        border-radius: 10px;
    }

.newsletter-editor {
    width: 100% !important;
    max-width: none !important;
    height: 350px !important;
    display: block;
}
/* =====================================================
   MAILING LIST
   ===================================================== */

.lettere-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

    .lettere-toolbar a {
        display: inline-block !important;
        min-width: 40px;
        padding: 8px 12px;
        margin-right: 4px;
        margin-bottom: 4px;
        text-align: center;
        background: #edf3f4;
        border: 1px solid #d5d9dc;
        border-radius: 6px;
        color: #444 !important;
        font-weight: 700;
        text-decoration: none !important;
    }

        .lettere-toolbar a:hover {
            background: #dfeee2;
            color: var(--marketing-green) !important;
        }


/* =====================================================
   MODAL CONTATTO
   ===================================================== */

.astra-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    overflow-y: auto;
    padding: 40px;
}

.astra-modal-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

    .astra-modal-content h3 {
        margin-bottom: 25px;
    }

    .astra-modal-content label {
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
        color: #444;
    }

    .astra-modal-content .form-control,
    .astra-modal-content .form-select {
        width: 100%;
    }

    .astra-modal-content textarea {
        min-height: 140px;
    }

/* =====================================================
   CHECKBOX SELEZIONE
   ===================================================== */

.marketing-grid input[type=checkbox] {
    transform: scale(1.2);
}

/* =====================================================
   RIGA APPENA MODIFICATA
   ===================================================== */

.riga-evidenziata td {
    background: #d8f3dc !important;
}
/* ==========================================
   RUBRICA LETTERE
   ========================================== */

.lettere-toolbar {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 25px;
}

    .lettere-toolbar a {
        display: inline-block !important;
        min-width: 38px !important;
        padding: 8px 12px !important;
        background: #edf3f4 !important;
        border: 1px solid #cfd3d7 !important;
        border-radius: 6px !important;
        color: #333 !important;
        text-decoration: none !important;
        font-weight: 700 !important;
        text-align: center !important;
        transition: .2s;
    }

        .lettere-toolbar a:hover {
            background: #dfeee2 !important;
            color: #1b5e20 !important;
            text-decoration: none !important;
        }
.badge-cestinato {
    display: inline-block;
    min-width: 110px;
    text-align: center;
    background: #343a40;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
/* =====================================================
   MARKETING V2
   ===================================================== */

.marketing-v2-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.marketing-v2-sidebar {
    width: 285px;
    background: linear-gradient( 180deg, #041632 0%, #08245a 50%, #041632 100%);
    color: #d8d06b;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 18px rgba(0,0,0,.25);
    z-index: 1000;
}
/* Logo */
.marketing-v2-logo {
    padding: 20px 15px;
    text-align: center;
    border-bottom: none;
}
.marketing-v2-logo img {
        width: 200px;
        margin-left: -20px;
    }

/* Menu */

.marketing-v2-menu {
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    gap: 6px;
}

    .marketing-v2-menu a {
        color: #d8d06b;
        text-decoration: none;
        padding: 9px 18px;
        border-radius: 8px;
        font-weight: 600;
        transition: .2s;
    }

        .marketing-v2-menu a:hover {
            background: rgba(255,255,255,.10);
            color: #fff4a3;
            text-decoration: none;
        }

/* Footer */

.marketing-v2-footer {
    margin-top: auto;
    padding: 20px 15px;
    border-top: 2px solid #d8d06b
}

    .marketing-v2-footer a {
        color: #d8d06b;
        text-decoration: none;
        font-weight: 700;
    }

        .marketing-v2-footer a:hover {
            color: #fff4a3;
            text-decoration: none;
        }

/* Content */

.marketing-v2-content {
    position: relative;
    left: 0;
    width: calc(100vw - 285px);
    min-height: 100vh;
    margin-left: 285px;
    background: transparent;
}

.marketing-v2-menu a.attivo {
    background: rgba(216,208,107,.18);
    border-left: 4px solid #d8d06b;
    color: #fff4a3;
    font-weight: 700;
}
.menu-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    vertical-align: middle;
    filter: invert(82%) sepia(24%) saturate(512%) hue-rotate(12deg) brightness(96%) contrast(90%);
}
.menu-separatore {
    height: 2px;
    margin: 8px 20px;
    background: #d8d06b;
}

.marketing-v2-clubhouse {
    margin-top: auto;
    padding: 15px;
}

    .marketing-v2-clubhouse a {
        color: #d8d06b;
        text-decoration: none;
        font-weight: 700;
    }

        .marketing-v2-clubhouse a:hover {
            color: #fff4a3;
        }