/* ============================================================
   LoyaltyAutomated — custom.css
   Restyling progressivo sopra Foundation 6 + app.min.css
   Colore brand: #D4537E
   ============================================================ */

body {
    background-image: none;
    background-color: #f5f5f3;
    color: #1a1a1a;
    font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    color: #1a1a1a;
}

.panel {
    background-color: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    box-shadow: none;
}

.shadow {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    filter: none;
    -ms-filter: none;
}

.rounded {
    border-radius: 12px;
}

#main-nav .title-bar,
.title-bar {
    background-color: #1a1a1a;
    min-height: 48px;
    padding: 0 20px;
}

#main-nav .title-bar .menu li a,
.title-bar .title-bar-title a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

#logout_link a,
#pin_logout_link a {
    color: rgba(255,255,255,0.65) !important;
    font-size: 13px !important;
    transition: color 0.15s;
}

#logout_link a:hover,
#pin_logout_link a:hover {
    color: #ffffff !important;
}

.button,
button.button {
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    padding: 8px 18px;
    border: none;
    transition: opacity 0.15s;
}
.submitBtn,
.submitBtn:hover,
.submitBtn:focus {
    background-color: #D4537E;
}

.button.success,
button.success {
    background-color: #D4537E;
    border-color: #D4537E;
    color: #ffffff;
}

.button.success:hover,
button.success:hover {
    background-color: #be4870;
    color: #ffffff;
}

.button.alert {
    background-color: #E24B4A;
    border-color: #E24B4A;
    color: #ffffff;
}

.button.secondary {
    background-color: transparent;
    border: 0.5px solid rgba(0,0,0,0.2);
    color: #444;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="time"],
select,
textarea {
    border: 0.5px solid rgba(0,0,0,0.18);
    border-radius: 8px;
    background-color: #fafafa;
    font-size: 13px;
    color: #1a1a1a;
    transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #D4537E;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212,83,126,0.1);
}

label {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.tabs {
    border: none;
    border-bottom: 0.5px solid rgba(0,0,0,0.1);
    background: transparent;
}

.tabs-title > a {
    font-size: 13px;
    color: #888;
    padding: 10px 16px;
    border-bottom: 2px solid transparent;
}

.tabs-title > a:hover {
    color: #1a1a1a;
    background: transparent;
}

.tabs-title.is-active > a {
    color: #D4537E;
    border-bottom: 2px solid #D4537E;
    background: transparent;
    font-weight: 500;
}

.tabs-content {
    border: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 500;
    padding: 10px 12px;
    border-bottom: 0.5px solid rgba(0,0,0,0.1);
    background: transparent;
}

table tbody td {
    padding: 11px 12px;
    border-bottom: 0.5px solid rgba(0,0,0,0.07);
    color: #1a1a1a;
    vertical-align: middle;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover td {
    background-color: #fafafa;
}

.callout {
    border-radius: 8px;
    border: none;
    font-size: 13px;
    padding: 10px 14px;
}

.success.callout {
    background-color: #EAF3DE;
    color: #3B6D11;
}

.alert.callout {
    background-color: #FCEBEB;
    color: #A32D2D;
}

.warning.callout {
    background-color: #FAEEDA;
    color: #854F0B;
}

.switch-paddle {
    background: rgba(0,0,0,0.15);
    border-radius: 20px;
}

input:checked ~ .switch-paddle {
    background: #D4537E;
}

.reveal {
    border-radius: 12px;
    border: 0.5px solid rgba(0,0,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 1.5rem;
}

.champions         { background-color: #dfebba; }
.loyal-customers   { background-color: #eaf8c0; }
.potential-loyalist{ background-color: #bffffb; }
.new-customers     { background-color: #fef0ee; }
.promising         { background-color: #bfebfd; }
.customers-needing-attention { background-color: #a9f5eb; }
.about-to-sleep    { background-color: #acdae2; }
.at-risk           { background-color: #ffecb5; }
.cant-lose-them    { background-color: #ffcacf; }
.hibernating       { background-color: #eceef1; }
.lost              { background-color: #d8e1ea; }

.la-brand   { color: #D4537E; }

.la-card {
    background: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 1.25rem;
}

.la-card-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 6px;
}

.la-kpi-val {
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
}

.la-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}

.la-badge-success { background: #EAF3DE; color: #3B6D11; }
.la-badge-warning { background: #FAEEDA; color: #854F0B; }
.la-badge-danger  { background: #FCEBEB; color: #A32D2D; }
.la-badge-neutral { background: #f0eeea; color: #666; }

.la-divider {
    border: none;
    border-top: 0.5px solid rgba(0,0,0,0.08);
    margin: 1rem 0;
}

a { color: #D4537E; }
a:hover { color: #be4870; }

.anchor-black,
.anchor-black:focus,
.anchor-black:hover { color: #1a1a1a; }

@media screen and (max-width: 639px) {
    #main-nav { display: none; }
    .title-bar { padding: 12px 16px; }
}

/* --- Sidebar laterale ------------------------------------- */
#la-sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #1a1a1a;
    z-index: 100;
    overflow-y: auto;
    transform: translateX(-220px);
    transition: transform 0.2s ease;
    padding: 1rem 0;
}

#la-sidebar.open {
    transform: translateX(0);
}

#la-sidebar a {
    display: flex;
    align-items: center;
    gap:10px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

#la-sidebar a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.06);
    border-left-color: #D4537E;
}

#la-sidebar a i {
    font-size: 17px;
    width: 20px;
    flex-shrink: 0;
    color: rgba(255,255,255,0.45);
}

#la-sidebar a:hover i {
    color: #D4537E;
}

#la-sidebar .sidebar-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.3);
    padding: 14px 18px 4px;
}

#la-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}

#la-sidebar-overlay.open {
    display: block;
}

#la-sidebar-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 12px 0 0;
    color: rgba(255,255,255,0.8);
    font-size: 20px;
    display: flex;
    align-items: center;
}

#la-sidebar-toggle:hover {
    color: #ffffff;
}

body.sidebar-open {
    overflow: hidden;
}

/* --- Details / Add points / Deduct points ----------------- */

/* Bottone campagna nella scheda cliente */
.button.large.expanded {
    border-radius: 8px;
    font-size: 14px;
    padding: 12px 16px;
    text-align: left;
    margin-bottom: 8px;
}

.button.large.expanded h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Bottone campagna attiva (colore brand) */
.button.large.expanded:not(.secondary):not(.alert):not(.other) {
    background-color: #D4537E;
    border-color: #D4537E;
    color: #ffffff;
}

.button.large.expanded:not(.secondary):not(.alert):not(.other):hover {
    background-color: #be4870;
}

/* Campagna inattiva */
.button.other {
    background-color: #f0eeea;
    border-color: #f0eeea;
    color: #888;
    opacity: 1;
}

/* Bottone riscatta coupon automazioni */
.button.secondary.large.expanded {
    background-color: #f0eeea;
    border: 0.5px solid rgba(0,0,0,0.1);
    color: #888;
}

/* Panel grigio per premi/promozioni buyx */
.panel.grey {
    background-color: #fafafa;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 14px;
}

/* Titolo scheda cliente */
.panel h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.panel h3 small {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Cronologia transazioni — toggle link */
.title a[data-toggle] {
    font-size: 13px;
    color: #D4537E;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tabella transazioni */
.table-scroll {
    overflow-x: auto;
    margin-top: 8px;
}

.table-scroll table thead th {
    font-size: 11px;
}

.table-scroll table tbody td {
    font-size: 12px;
}

/* Saldo flottante a destra */
#balance h4 {
    font-size: 22px;
    font-weight: 500;
    color: #D4537E;
    margin: 0;
}

/* Add/Deduct — input importo */
#points, #amount {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.18);
    background: #fafafa;
}

#points:focus, #amount:focus {
    border-color: #D4537E;
    box-shadow: 0 0 0 3px rgba(212,83,126,0.1);
    background: #fff;
}

/* Bottone aggiungi punti */
.button.success.large {
    background-color: #D4537E;
    font-size: 15px;
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
}

/* Bottone deduci/riscatta */
.button.alert.large {
    background-color: #E24B4A;
    font-size: 15px;
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
}

/* Separatore "oppure" */
.medium-12.columns[style*="height: 1px"] {
    border: none;
    border-top: 0.5px solid rgba(0,0,0,0.1) !important;
    background: none !important;
    height: 1px !important;
}

/* Switch premi/promozioni */
.switch.tiny .switch-paddle {
    width: 36px;
    height: 20px;
    border-radius: 10px;
}

/* Reveal modal modifica cliente */
.reveal h4 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* --- Admin link ------------------------------------------- */
#main-nav ~ .row .large-12.columns.center.mt10 a,
.row .large-12.columns.center.mt10 a {
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
}
.row .large-12.columns.center.mt10 a:hover {
    color: #D4537E;
}

/* --- Search results --------------------------------------- */
.panel.center h4.center {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 0;
}

/* Bottone risultato ricerca */
.button.expanded.radius.clearfix {
    background-color: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.12);
    color: #1a1a1a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 6px;
    transition: all 0.15s;
}

.button.expanded.radius.clearfix:hover {
    background-color: #FBEAF0;
    border-color: #D4537E;
    color: #D4537E;
}

.button.expanded.radius.clearfix .float-left h4,
.button.expanded.radius.clearfix span.float-left {
    font-size: 14px;
    font-weight: 500;
    color: inherit;
}

.button.expanded.radius.clearfix span.float-right small {
    font-size: 12px;
    color: #aaa;
}

/* --- Redeem coupons --------------------------------------- */
.panel.radius.grey.clearfix,
.panel.radius.grey {
    background-color: #fafafa;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

/* Coupon card */
.panel.radius.grey .medium-6.large-6.columns {
    font-size: 13px;
    font-weight: 500;
}

.panel.radius.grey small {
    font-size: 12px;
    color: #888;
}

/* --- Automations results ---------------------------------- */
.dropdown.menu {
    border-bottom: 0.5px solid rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.dropdown.menu li a {
    font-size: 13px;
    color: #888;
    padding: 8px 16px;
    border-bottom: 2px solid transparent;
}

.dropdown.menu li.is-active a,
.dropdown.menu li a:hover {
    color: #D4537E;
    border-bottom-color: #D4537E;
    background: transparent;
}

/* Icone download/edit nelle tabelle */
.fi-download,
.fi-page-edit {
    font-size: 150% !important;
    color: #D4537E;
}

/* Switch piccolo nelle tabelle */
.switch.small .switch-paddle {
    width: 50px;
    height: 24px;
}

/* --- Email send / SMS ------------------------------------- */
.section-container.auto {
    border: none;
}

/* Textarea email/SMS */
#email_html,
#sms_text {
    min-height: 120px;
    font-size: 13px;
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.18);
    background: #fafafa;
    padding: 10px;
}

#email_html:focus,
#sms_text:focus {
    border-color: #D4537E;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212,83,126,0.1);
    outline: none;
}

/* Counter SMS */
#sms_text_counter {
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.18);
    background: #fafafa;
}

/* Merge fields lista */
.panel ul li code,
.row ul li code {
    background: #f0eeea;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    color: #D4537E;
}

/* Radio buttons schedule SMS */
input[type="radio"] {
    accent-color: #D4537E;
}

/* Datepicker inputs */
.datepicker_future_only,
.datepicker_insights_start_date,
.datepicker_insights_end_date {
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.18);
    background: #fafafa;
    font-size: 13px;
    padding: 8px 10px;
}

/* --- Insights --------------------------------------------- */
#ajax-loader {
    margin: 2rem auto;
}

/* Dropdown automazione in insights */
#automation {
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.18);
    background: #fafafa;
    font-size: 13px;
    padding: 8px 10px;
}

/* --- Reports ---------------------------------------------- */
input[type="radio"].report {
    accent-color: #D4537E;
}

input[type="number"].report {
    border-radius: 8px;
    border: 0.5px solid rgba(0,0,0,0.18);
    background: #fafafa;
    font-size: 13px;
    padding: 8px 10px;
    width: auto;
}

/* --- Settings tabs ---------------------------------------- */
.tabs-panel {
    padding: 1rem 0;
}

/* Switch impostazioni */
.switch.large .switch-paddle {
    width: 70px;
    height: 32px;
    border-radius: 16px;
}

/* --- CPL -------------------------------------------------- */
input[type="file"] {
    font-size: 13px;
    padding: 6px;
    border: 0.5px solid rgba(0,0,0,0.18);
    border-radius: 8px;
    background: #fafafa;
    width: 100%;
}

/* --- Chartist grafici -------------------------------------- */
.ct-series-a .ct-slice-pie,
.ct-series-a .ct-bar,
.ct-series-a .ct-line,
.ct-series-a .ct-point {
    stroke: #D4537E;
    fill: #D4537E;
}
.ct-series-a .ct-line {
    stroke-width: 2px;
    fill: none;
}
.ct-series-a .ct-point {
    stroke-width: 7px;
}
.ct-legend .ct-series-0:before {
    background-color: #D4537E;
}

.ct-series-b .ct-slice-pie,
.ct-series-b .ct-bar {
    fill: #FBEAF0;
    stroke: #FBEAF0;
}

/* --- Reveal modal globale --------------------------------- */
.reveal-overlay {
    background: rgba(0,0,0,0.4);
}

/* --- Footer admin link ------------------------------------ */
.row .large-12.center.mt10 {
    padding: 1rem 0;
    border-top: 0.5px solid rgba(0,0,0,0.07);
    margin-top: 1rem;
}

/* --- Header bar3 (scheda cliente) ------------------------- */
#edit_customer_button a.button.success {
    background-color: #D4537E;
    border-color: #D4537E;
    border-radius: 6px;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 500;
}

#goback_link a {
    color: rgba(255,255,255,0.7) !important;
    font-size: 12px !important;
}

#goback_link a:hover {
    color: #ffffff !important;
}

/* --- Scheda cliente --------------------------------------- */

/* Nome cliente */
.panel h3.left {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 2px;
}

.panel h3.left small {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Intestazione campagne "Seleziona una campagna / Bilancio" */
.panel h5.float-left,
.panel h5.float-right {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Bottone campagna attiva (rosa) */
a.button.large.expanded.radius.clearfix:not(.other):not(.secondary) {
    background-color: #D4537E;
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
}

a.button.large.expanded.radius.clearfix:not(.other):not(.secondary):hover {
    background-color: #be4870;
}

/* Bottone campagna inattiva */
a.button.large.expanded.radius.clearfix.other {
    background-color: #f5f5f3;
    border: 0.5px solid rgba(0,0,0,0.1);
    color: #888;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
}

/* Nome campagna nel bottone */
a.button.large.expanded.radius.clearfix h4.nopm {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: inherit;
}

/* Saldo nel bottone */
a.button.large.expanded.radius.clearfix span.float-right h4.nopm {
    font-size: 16px;
    font-weight: 500;
}

/* Bottone riscatta coupon automazioni */
a.button.secondary.large.expanded.radius.clearfix {
    background-color: #FAEEDA;
    border: 0.5px solid #F5C4B3;
    color: #854F0B;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    opacity: 1;
}

a.button.secondary.large.expanded.radius.clearfix:hover {
    background-color: #F5C4B3;
}

/* Link cronologia transazioni */
.title a[data-toggle] {
    font-size: 13px;
    color: #D4537E;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.title a[data-toggle]:hover {
    color: #be4870;
}

/* Icona +/- cronologia */
.title a[data-toggle] .fi-plus,
.title a[data-toggle] .fi-minus {
    font-size: 14px;
}

/* --- Header bar3: padding e font uniformi ---------------- */
#main-nav .title-bar-right .menu {
    gap: 12px;
    padding-right: 20px;
}

#main-nav .title-bar-right .menu li {
    display: flex;
    align-items: center;
}

#edit_customer_button {
    margin-right: 8px;
}

#goback_link a,
#logout_link a,
#pin_logout_link a {
    color: rgba(255,255,255,0.75) !important;
    font-size: 13px !important;
}

#goback_link a:hover,
#logout_link a:hover,
#pin_logout_link a:hover {
    color: #ffffff !important;
}

/* --- Bottone campagna: nome e saldo leggibili ------------- */
a.button.large.expanded.radius.clearfix h4.nopm {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    line-height: 1.3;
}

a.button.large.expanded.radius.clearfix.other h4.nopm {
    color: #666 !important;
}

a.button.large.expanded.radius.clearfix span.float-right h4.nopm {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

a.button.large.expanded.radius.clearfix.other span.float-right h4.nopm {
    color: #888 !important;
}

/* "pt" o "€" dopo il numero */
a.button.large.expanded.radius.clearfix span.float-right h4.nopm small {
    font-size: 12px !important;
    font-weight: 400 !important;
    opacity: 0.85;
    margin-left: 2px;
}

/* --- Header bar3: fix padding e font uniformi ------------ */
#main-nav .title-bar-right.mr50 {
    padding-right: 20px;
}

#main-nav .title-bar-right .menu li#edit_customer_button {
    margin-right: 8px;
}

#main-nav .title-bar-right .menu li#edit_customer_button a {
    background-color: #D4537E !important;
    border-color: #D4537E !important;
    border-radius: 6px;
    font-size: 13px !important;
    padding: 6px 14px;
    font-weight: 500;
    color: #fff !important;
}

#main-nav .title-bar-right .menu li#goback_link a,
#main-nav .title-bar-right .menu li#logout_link a,
#main-nav .title-bar-right .menu li#pin_logout_link a {
    color: rgba(255,255,255,0.8) !important;
    font-size: 13px !important;
}

#main-nav .title-bar-right .menu li#goback_link a small,
#main-nav .title-bar-right .menu li#logout_link a small,
#main-nav .title-bar-right .menu li#pin_logout_link a small {
    font-size: 13px !important;
    color: inherit !important;
}

/* --- Bottone campagna: nome e saldo leggibili ------------- */
.panel a.button.large.expanded.radius h4.nopm {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
}

.panel a.button.large.expanded.radius.other h4.nopm {
    color: #666 !important;
}

.panel a.button.large.expanded.radius span.float-right h4.nopm {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.panel a.button.large.expanded.radius span.float-right h4.nopm small {
    font-size: 13px !important;
    font-weight: 400 !important;
    margin-left: 2px;
    opacity: 0.9;
}

.panel a.button.large.expanded.radius.other span.float-right h4.nopm {
    color: #888 !important;
}


/* === switch large refine 06giugno v2 === */
.switch.large{margin-bottom:0;}
.switch.large .switch-paddle{position:relative;width:70px;height:32px;border-radius:999px;}
.switch.large .switch-paddle::after{content:'';position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;border:0.5px solid rgba(0,0,0,0.12);transition:transform .18s ease;}
.switch.large .switch-input:checked ~ .switch-paddle::after{left:3px;transform:translateX(38px);}
.switch.large .switch-active,
.switch.large .switch-inactive{position:absolute;top:0;height:32px;line-height:32px;transform:none;font-size:13px;font-weight:500;letter-spacing:.05em;}
.switch.large .switch-active{left:12px;color:#fff;}
.switch.large .switch-inactive{right:11px;color:rgba(0,0,0,0.45);}
