/* Gestione Assistenza - Professional Dark Theme */

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.6); }
}

@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes envelopeBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    25% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
    75% { opacity: 0.6; transform: scale(0.95); }
}

@keyframes bellShake {
    0% { transform: rotate(0); }
    15% { transform: rotate(12deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(8deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(0); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.8), 0 0 30px rgba(251, 191, 36, 0.3); }
}

/* ========== BASE ========== */
:root {
    --bg-dark: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #222633;
    --bg-surface: #151820;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #2d3348;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

a {
    color: var(--accent-light);
    transition: color 0.2s;
}

a:hover {
    color: #a5b4fc;
}

/* ========== LOGO ========== */
.navbar-logo {
    height: 72px;
    width: 72px;
    object-fit: contain;
    border-radius: 3px;
    margin-right: 0.35rem;
    vertical-align: middle;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.3));
    transition: filter 0.3s, transform 0.3s;
}

.navbar-brand:hover .navbar-logo {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.6));
    transform: scale(1.05);
}

.login-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto 0.5rem;
    filter: drop-shadow(0 3px 12px rgba(99, 102, 241, 0.3));
    animation: fadeInUp 0.6s ease;
}

.hero-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    margin: 0 auto 0.75rem;
    filter: drop-shadow(0 4px 20px rgba(255, 255, 255, 0.2));
    animation: float 3s ease-in-out infinite;
}

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(15, 17, 23, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    margin-right: 0.5rem;
    color: var(--accent-light);
}

.navbar .badge.bg-primary {
    background: var(--accent) !important;
    font-size: 0.65rem;
    padding: 0.25em 0.6em;
    vertical-align: middle;
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease backwards;
    color: var(--text-primary);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.card-body {
    color: var(--text-primary);
}

.card-title {
    color: var(--text-primary);
}

/* Stagger animation for multiple cards */
.row .col-md-3:nth-child(1) .card,
.row .col-6:nth-child(1) .card { animation-delay: 0.05s; }
.row .col-md-3:nth-child(2) .card,
.row .col-6:nth-child(2) .card { animation-delay: 0.1s; }
.row .col-md-3:nth-child(3) .card,
.row .col-6:nth-child(3) .card { animation-delay: 0.15s; }
.row .col-md-3:nth-child(4) .card,
.row .col-6:nth-child(4) .card { animation-delay: 0.2s; }

.row .col-md-4:nth-child(1) .card { animation-delay: 0.1s; }
.row .col-md-4:nth-child(2) .card { animation-delay: 0.2s; }
.row .col-md-4:nth-child(3) .card { animation-delay: 0.3s; }

/* ========== STATS CARDS ========== */
.stats-card {
    border-left: 4px solid;
    border-radius: 1rem;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

.stats-card.stats-active {
    outline: 2px solid var(--text-primary);
    outline-offset: -2px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(20px, -20px);
}

.stats-card.border-primary { border-left-color: var(--info); }
.stats-card.border-primary::after { background: var(--info); }
.stats-card.border-warning { border-left-color: var(--warning); }
.stats-card.border-warning::after { background: var(--warning); }
.stats-card.border-success { border-left-color: var(--success); }
.stats-card.border-success::after { background: var(--success); }
.stats-card.border-danger { border-left-color: var(--danger); }
.stats-card.border-danger::after { background: var(--danger); }

.stats-card .stats-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    animation: countUp 0.6s ease backwards;
}

.stats-card:nth-child(1) .stats-number { animation-delay: 0.1s; }
.stats-card:nth-child(2) .stats-number { animation-delay: 0.2s; }
.stats-card:nth-child(3) .stats-number { animation-delay: 0.3s; }
.stats-card:nth-child(4) .stats-number { animation-delay: 0.4s; }

.stats-card .stats-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.text-primary { color: var(--info) !important; }
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-secondary { color: var(--text-muted) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-light { color: var(--text-primary) !important; }

/* ========== BADGES ========== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.badge-priority-bassa { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-priority-media { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-priority-alta { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-priority-urgente {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.3);
}

.badge-status-aperto { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-status-in_lavorazione { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-status-risolto { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-status-chiuso { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }

.badge.bg-secondary { background: rgba(100, 116, 139, 0.2) !important; color: #94a3b8; }
.badge.bg-primary { background: var(--accent) !important; }
.badge.bg-success { background: rgba(16, 185, 129, 0.2) !important; color: #34d399; }
.badge.bg-light { background: rgba(255, 255, 255, 0.1) !important; color: var(--text-primary); }

/* ========== TABLES ========== */
.table {
    --bs-table-color: var(--text-primary) !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-color: var(--text-primary) !important;
    --bs-table-hover-bg: rgba(99, 102, 241, 0.08) !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted) !important;
    border-bottom: 2px solid var(--border) !important;
    padding: 1rem 0.75rem;
    background: rgba(0, 0, 0, 0.2) !important;
}

.table td {
    vertical-align: middle;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
    padding: 0.85rem 0.75rem;
}

.table td strong {
    color: var(--accent-light);
}

.table td small {
    color: var(--text-secondary) !important;
}

.table-hover tbody tr {
    cursor: pointer;
    transition: all 0.2s;
}

.table-hover tbody tr:hover {
    background: rgba(99, 102, 241, 0.12) !important;
}

.table-hover tbody tr:hover td {
    color: #fff !important;
}

/* Table row animation */
.table tbody tr {
    animation: fadeIn 0.4s ease backwards;
}

.table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table tbody tr:nth-child(2) { animation-delay: 0.08s; }
.table tbody tr:nth-child(3) { animation-delay: 0.11s; }
.table tbody tr:nth-child(4) { animation-delay: 0.14s; }
.table tbody tr:nth-child(5) { animation-delay: 0.17s; }
.table tbody tr:nth-child(6) { animation-delay: 0.20s; }
.table tbody tr:nth-child(7) { animation-delay: 0.23s; }
.table tbody tr:nth-child(8) { animation-delay: 0.26s; }
.table tbody tr:nth-child(9) { animation-delay: 0.29s; }
.table tbody tr:nth-child(10) { animation-delay: 0.32s; }

.table-sm td, .table-sm th {
    color: var(--text-primary);
}

.table-borderless td, .table-borderless th {
    border: none;
}

/* ========== TICKET DETAIL ========== */
.ticket-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.ticket-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.ticket-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.ticket-header h3 {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.ticket-header > * {
    position: relative;
    z-index: 1;
}

/* ========== REPLY CARDS ========== */
.reply-card {
    border-left: 3px solid var(--border);
    margin-bottom: 1rem;
    background: var(--bg-card);
    animation: slideInLeft 0.4s ease backwards;
}

.reply-card:nth-child(odd) { animation-name: slideInLeft; }
.reply-card:nth-child(even) { animation-name: slideInRight; }

.reply-card.reply-operator {
    border-left-color: var(--accent);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.reply-card.reply-client {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.reply-card:hover {
    transform: translateX(4px);
}

/* ========== HERO / LANDING PAGE ========== */
.hero-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4f46e5 60%, #6366f1 100%);
    color: white;
    padding: 6rem 0;
    border-radius: 0 0 3rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    animation: shimmer 8s ease-in-out infinite;
    background-size: 200% 100%;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -1px;
    animation: fadeInUp 0.7s ease;
}

.hero-section .lead {
    animation: fadeInUp 0.7s ease 0.15s backwards;
    opacity: 0.9;
}

.hero-section .mt-4 {
    animation: fadeInUp 0.7s ease 0.3s backwards;
}

.hero-section i.bi-headset {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

/* ========== FEATURE CARDS ========== */
.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.feature-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.feature-card i {
    font-size: 3rem;
    color: var(--accent-light);
    margin-bottom: 1.25rem;
    transition: transform 0.3s;
}

.feature-card:hover i {
    transform: scale(1.15);
}

.feature-card h5 {
    color: var(--text-primary);
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
}

/* ========== FILTER BAR ========== */
.filter-bar {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease 0.1s backwards;
}

/* ========== FORMS ========== */
.form-control, .form-select {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-surface);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

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

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

/* ========== BUTTONS ========== */
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5558e6;
    border-color: #5558e6;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.navbar .btn-outline-light.nav-active,
.navbar .btn-outline-light.nav-active:hover,
.navbar .btn-outline-light.nav-active:focus {
    border-color: #ffffff !important;
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15) !important;
}

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-outline-primary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-light);
    color: var(--accent-light);
}

.btn-outline-warning {
    border-color: var(--warning);
    color: var(--warning);
}

.btn-outline-warning:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.btn-outline-danger {
    border-color: var(--danger);
    color: #f87171;
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: #fca5a5;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-dark {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-dark:hover {
    background: #5558e6;
    border-color: #5558e6;
}

.btn-light {
    background: white;
    color: var(--accent);
    font-weight: 600;
}

.btn-light:hover {
    background: #f0f0ff;
    color: #4f46e5;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ========== ALERTS ========== */
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-success a {
    color: #34d399;
}

.alert-secondary {
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: var(--text-secondary);
}

/* ========== ATTACHMENTS ========== */
.attachment-item {
    display: inline-flex;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.3rem 0.85rem;
    border-radius: 2rem;
    margin: 0.25rem;
    font-size: 0.8rem;
    color: var(--accent-light) !important;
    transition: all 0.2s;
}

.attachment-item:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.attachment-item i {
    margin-right: 0.35rem;
}

/* ========== USER INFO SIDEBAR ========== */
.user-info-card {
    border-left: 3px solid var(--accent);
}

/* ========== MODAL ========== */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border);
}

.modal-title {
    color: var(--text-primary);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-backdrop.show {
    backdrop-filter: blur(4px);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    background: transparent;
    padding: 0;
    animation: fadeIn 0.4s ease;
}

.breadcrumb-item a {
    color: var(--accent-light);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ========== LOGIN / REGISTER CARD ========== */
body.bg-light {
    background-color: var(--bg-dark) !important;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
}

/* ========== HEADINGS ========== */
h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== FOOTER ========== */
footer p {
    color: var(--text-muted);
}

/* ========== NOTIFICATIONS / ENVELOPE ========== */

/* Busta lampeggiante nella riga della tabella */
.envelope-blink {
    display: inline-flex;
    align-items: center;
    color: #fbbf24;
    animation: envelopeBlink 1.5s ease-in-out infinite;
    font-size: 1rem;
}

.envelope-blink i {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

.envelope-blink .unread-count {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1em 0.45em;
    border-radius: 1rem;
    margin-left: 0.2rem;
    line-height: 1.3;
}

/* Riga ticket con risposte non lette */
.ticket-unread {
    background: rgba(251, 191, 36, 0.06) !important;
    border-left: 3px solid #fbbf24;
}

.ticket-unread:hover {
    background: rgba(251, 191, 36, 0.12) !important;
}

/* Campanella / busta nella navbar */
.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: default;
}

.notification-bell i {
    font-size: 1.3rem;
    color: #fbbf24;
    animation: bellShake 2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
}

/* ========== NAVBAR MOBILE ========== */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.6rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}

.navbar-collapse {
    background: rgba(15, 17, 23, 0.95);
    border-radius: 0 0 0.75rem 0.75rem;
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        padding: 0.5rem 1rem;
        margin-top: 0.5rem;
        border: 1px solid var(--border);
        border-top: none;
    }

    .navbar-collapse .btn {
        width: 100%;
        text-align: left;
    }
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-section i.bi-headset {
        font-size: 2.5rem;
    }
    .stats-card .stats-number {
        font-size: 1.6rem;
    }
    .card {
        border-radius: 0.75rem;
    }

    /* Tabelle: scroll orizzontale fluido */
    .table th, .table td {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.65rem 0.5rem;
    }

    /* Ticket header compatto */
    .ticket-header {
        padding: 1.25rem;
    }
    .ticket-header h3 {
        font-size: 1.2rem;
    }

    /* Sidebar sotto il contenuto su tablet */
    .col-md-8, .col-md-4 {
        margin-bottom: 1rem;
    }

    /* Filter bar compatto */
    .filter-bar .row {
        gap: 0.5rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    /* Stats cards in griglia 2x2 */
    .stats-card .stats-number {
        font-size: 1.4rem;
    }
    .stats-card .stats-label {
        font-size: 0.65rem;
    }

    /* Tabelle mobile-friendly */
    .table th, .table td {
        font-size: 0.8rem;
        padding: 0.5rem 0.4rem;
    }

    /* Badge piu compatti */
    .badge {
        font-size: 0.65rem;
        padding: 0.3em 0.6em;
    }

    /* Bottoni touch-friendly */
    .btn {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .btn-sm {
        min-height: 34px;
    }

    /* Card login/register piu stretto */
    .card-body.p-4 {
        padding: 1.25rem !important;
    }

    /* Ticket header mobile */
    .ticket-header {
        padding: 1rem;
    }
    .ticket-header h3 {
        font-size: 1.1rem;
    }
    .ticket-header .d-flex {
        flex-direction: column;
    }
    .ticket-header .text-end {
        text-align: left !important;
        margin-top: 0.5rem;
    }

    /* Reply cards */
    .reply-card .card-body {
        padding: 0.75rem;
    }

    /* Form textarea */
    textarea.form-control {
        font-size: 0.9rem;
    }

    /* Hero */
    .hero-section {
        padding: 2.5rem 0;
        border-radius: 0 0 1rem 1rem;
    }
    .hero-section h1 {
        font-size: 1.5rem;
    }
    .hero-section .btn-lg {
        font-size: 0.95rem;
        padding: 0.5rem 1.25rem;
    }

    /* Feature cards stack */
    .feature-card {
        padding: 1.5rem;
    }
    .feature-card i {
        font-size: 2rem;
    }

    /* D-flex bottoni azioni */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
    .d-flex.justify-content-between .btn {
        width: 100%;
    }

    /* Breadcrumb compatto */
    .breadcrumb {
        font-size: 0.85rem;
    }

    /* Modal full-width su mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
}

