/*
 * InnoovaERP — Tema bianco e rosso
 * Sovrascrive le variabili di main.css
 */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --accent-primary: #ef4444;
    --accent-primary-light: #f87171;
    --accent-secondary: #be123c;
    --accent-secondary-light: #e11d48;
    --accent-tertiary: #ea580c;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(15,23,42,0.10);
    --border-light: rgba(15,23,42,0.06);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== BACKGROUND AMBIENT ===== */
.bg-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-ambient .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
}

.bg-ambient .orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239,68,68,0.22), transparent 70%);
    top: -200px;
    right: -100px;
    animation: float-orb 20s ease-in-out infinite;
}

.bg-ambient .orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(190,18,60,0.16), transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float-orb 25s ease-in-out infinite reverse;
}

.bg-ambient .orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(234,88,12,0.14), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float-orb 18s ease-in-out infinite 3s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== GRID PATTERN ===== */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 100%);
}

/* ===== NAVBAR ===== */
.navbar-custom {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 6px 22px rgba(15,23,42,0.05);
    padding: 0;
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 10px 30px rgba(15,23,42,0.10);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.navbar-brand-custom:hover {
    opacity: 0.85;
    color: var(--text-primary);
}

.logo-img {
    width: 120px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #fff;
    padding: 4px;
    flex-shrink: 0;
}

.logo-mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 14px;
    display: block;
    letter-spacing: 0;
    margin-top: -2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(239,68,68,0.08);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.nav-links a i {
    font-size: 16px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cart:hover {
    background: rgba(239,68,68,0.08);
    color: var(--text-primary);
    border-color: rgba(15,23,42,0.18);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 10px rgba(239,68,68,0.35);
}

.cart-badge[data-count="0"] {
    display: none;
}

.navbar-toggler-custom {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.navbar-toggler-custom:hover {
    background: rgba(239,68,68,0.08);
    color: var(--text-primary);
}

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1040;
    padding: 24px;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    border-top: 1px solid rgba(15,23,42,0.08);
}

.mobile-nav.show {
    display: flex;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--text-primary);
    background: rgba(239,68,68,0.08);
}

.mobile-nav a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* ===== HERO ===== */
.hero-section {
    position: relative;
    z-index: 1;
    padding: 80px 0 50px;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.07;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px 8px 12px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.18);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.hero-badge i {
    font-size: 16px;
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 20px;
    position: relative;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

.session-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(190,18,60,0.08);
    border: 1px solid rgba(190,18,60,0.20);
    border-radius: var(--radius-md);
    color: var(--accent-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-top: 28px;
    backdrop-filter: blur(8px);
}

.session-badge i {
    font-size: 18px;
}

/* ===== MAIN CONTENT NO HERO ===== */
.site-content--no-hero {
    padding-top: 40px;
}

.content-wrapper {
    max-width: 1320px;
    margin: -20px auto 0;
    padding: 0 24px;
}

.page-content {
    min-height: 40vh;
}

/* ===== SPINNER ===== */
.spinner-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(248,250,252,0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
}

.spinner-overlay.active {
    display: flex;
}

.spinner-ring {
    width: 64px;
    height: 64px;
    border: 3px solid rgba(239,68,68,0.15);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-text {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.spinner-text strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-msg {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(15,23,42,0.12);
    animation: toast-in 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
    min-width: 300px;
    max-width: 440px;
}

.toast-msg.toast-success {
    background: rgba(22,163,74,0.12);
    border: 1px solid rgba(22,163,74,0.22);
    color: #16a34a;
}

.toast-msg.toast-danger {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.22);
    color: #dc2626;
}

.toast-msg.toast-info {
    background: rgba(190,18,60,0.10);
    border: 1px solid rgba(190,18,60,0.20);
    color: var(--accent-secondary);
}

.toast-msg i {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-msg.removing {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
    background: rgba(255,255,255,0.5);
}

.footer p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent-primary);
}

/* ===== CARD DARK ===== */
.card-dark {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.card-dark:hover {
    background: var(--bg-card-hover);
    border-color: rgba(15,23,42,0.15);
    box-shadow: 0 8px 30px rgba(15,23,42,0.08);
}

.card-dark .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.card-dark .card-icon.icon-blue {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    color: var(--accent-primary);
}

.card-dark .card-icon.icon-emerald {
    background: rgba(190,18,60,0.08);
    border: 1px solid rgba(190,18,60,0.15);
    color: var(--accent-secondary);
}

.card-dark .card-icon.icon-amber {
    background: rgba(234,88,12,0.08);
    border: 1px solid rgba(234,88,12,0.15);
    color: var(--accent-tertiary);
}

.card-dark h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.card-dark p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ===== BTN GLOW ===== */
.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-glow-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(239,68,68,0.30);
}

.btn-glow-primary:hover {
    background: var(--accent-primary-light);
    color: white;
    box-shadow: 0 6px 30px rgba(239,68,68,0.40);
    transform: translateY(-1px);
}

.btn-glow-emerald {
    background: var(--accent-secondary);
    color: white;
    box-shadow: 0 4px 20px rgba(190,18,60,0.30);
}

.btn-glow-emerald:hover {
    background: var(--accent-secondary-light);
    color: white;
    box-shadow: 0 6px 30px rgba(190,18,60,0.40);
    transform: translateY(-1px);
}

.btn-glow-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-glow-outline:hover {
    background: rgba(15,23,42,0.04);
    color: var(--text-primary);
    border-color: rgba(15,23,42,0.18);
}

/* ===== STEPPER ===== */
.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
}

.stepper-step {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    position: relative;
}

.stepper-step:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 16px;
}

.stepper-step.completed:not(:last-child)::after {
    background: var(--accent-secondary);
}

.stepper-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--accent-primary), var(--border-color));
}

.stepper-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.stepper-step.active .stepper-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 18px rgba(239,68,68,0.30);
}

.stepper-step.completed .stepper-dot {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
}

.stepper-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.stepper-step.active .stepper-label {
    color: var(--text-primary);
}

.stepper-step.completed .stepper-label {
    color: var(--accent-secondary);
}

/* ===== FORM DARK ===== */
.form-control-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-control-dark:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
    background-color: var(--bg-secondary);
}

.form-control-dark::placeholder {
    color: var(--text-muted);
}

select.form-control-dark {
    cursor: pointer;
}

select.form-control-dark option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-control-dark[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-label-dark {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FORM CHECK CUSTOM ===== */
.form-check-custom {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
}

.form-check-custom + .form-check-custom {
    border-top: 1px solid var(--border-light);
}

.form-check-input-dark {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid rgba(15,23,42,0.18);
    border-radius: 6px;
    background: var(--bg-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.form-check-input-dark:hover {
    border-color: var(--accent-primary);
}

.form-check-input-dark:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-input-dark:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-input-dark:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.form-check-label-dark {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-check-label-dark:hover {
    color: var(--text-primary);
}

.form-check-label-dark a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.form-check-label-dark a:hover {
    border-bottom-color: var(--accent-primary);
}

/* ===== ACCEPTANCE LIST ===== */
.acceptance-list {
    display: flex;
    flex-direction: column;
}

/* ===== LINK LIGHT ===== */
.link-light {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.link-light:hover {
    border-bottom-color: var(--accent-primary);
}

/* ===== HERO ACCESS FORM ===== */
.hero-access {
    margin-top: 28px;
}

.hero-access-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.hero-access-form {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.hero-access-form .form-control-dark {
    flex: 1;
}

/* ===== STEP NUM ===== */
.step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(239,68,68,0.10);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-primary);
}

/* ===== SSL BADGE ===== */
.ssl-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 500;
}

/* ===== PAYMENT LOGO ===== */
.payment-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.payment-logo img {
    height: 24px;
    width: auto;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.payment-logo img:hover {
    opacity: 1;
}

/* ===== PAGINAZIONE CUSTOM ===== */
.pagination-custom {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-custom li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-custom li a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(15,23,42,0.18);
}

.pagination-custom li a.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 12px rgba(239,68,68,0.25);
}

.pagination-custom li a.active:hover {
    background: var(--accent-primary-light);
    border-color: var(--accent-primary-light);
    color: white;
}

/* ===== BTN GLOW DANGER ===== */
.btn-glow-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.20);
}

.btn-glow-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.38);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.10);
    color: #b91c1c;
}

/* ===== BADGE DELEGA FIRMATA - Desktop ===== */
.badge-delega-firmata {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(22,163,74,0.10), rgba(22,163,74,0.04));
    border: 1px solid rgba(22,163,74,0.22);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.badge-delega-firmata i {
    font-size: 15px;
}

/* ===== BADGE DELEGA FIRMATA - Mobile ===== */
.badge-delega-firmata-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
    border-bottom: 1px solid var(--border-light);
    cursor: default;
    user-select: none;
}

.badge-delega-firmata-mobile i {
    font-size: 16px;
}

/* ===== BADGE DELEGA IN ATTESA - Desktop ===== */
.badge-delega-attesa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(245, 158, 11, 0.04));
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #d97706;
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.badge-delega-attesa i {
    font-size: 15px;
}

/* ===== BADGE DELEGA IN ATTESA - Mobile ===== */
.badge-delega-attesa-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #d97706;
    border-bottom: 1px solid var(--border-light);
    cursor: default;
    user-select: none;
}

.badge-delega-attesa-mobile i {
    font-size: 16px;
}

/* ===== INVALID STATES ===== */
.form-control-dark.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.10);
}

.form-control-dark.is-invalid:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.18);
}

.form-check-input-dark.is-invalid {
    border-color: #dc2626 !important;
}

.form-check-input-dark.is-invalid:checked {
    background-color: #fca5a5 !important;
    border-color: #ef4444 !important;
}

.form-check-label-dark.is-invalid {
    color: #dc2626 !important;
}

.form-check-input-dark.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12) !important;
}

/* ===== VALID STATES ===== */
.form-control-dark.is-valid {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.10);
}

.form-control-dark.is-valid:focus {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.18);
}

.form-check-input-dark.is-valid {
    border-color: #16a34a !important;
}

.form-check-input-dark.is-valid:checked {
    background-color: #86efac !important;
    border-color: #22c55e !important;
}

.form-check-label-dark.is-valid {
    color: #16a34a !important;
}

.form-check-input-dark.is-valid:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
}

/* ===== ERROR TEXT ===== */
.field-badge-error {
    display: none;
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
}

.form-control-dark.is-invalid + .field-badge-error {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .nav-links {
        display: none;
    }
    .navbar-toggler-custom {
        display: flex;
    }
    .hero-section {
        padding: 40px 0 24px;
    }
    .stepper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .stepper-step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-inner {
        padding: 0 16px;
        height: 64px;
    }
    .logo-text {
        display: none;
    }
    .content-wrapper {
        padding: 0 16px;
    }
    .hero-section {
        padding: 28px 0 16px;
    }
    .hero-badge {
        font-size: 12px;
        padding: 6px 14px 6px 8px;
    }
    .hero-access-form {
        flex-direction: column;
    }
    .hero-access-form .form-control-dark {
        width: 100%;
    }
    .hero-access-form .btn-glow {
        width: 100%;
        justify-content: center;
    }
    .toast-msg {
        min-width: auto;
        max-width: calc(100vw - 48px);
    }
    .toast-container {
        right: 16px;
        left: 16px;
    }
    .card-dark {
        padding: 24px;
    }
}