/* ================================================================
   CCIR - Sistema Gestione Soci
   CSS Unificato v2.0 - Camera di Commercio Italo-Russa
   ================================================================
   
   INDICE:
   1. Reset & Variables
   2. Typography & Base
   3. Layout System (Admin, Socio, Amici, Public)
   4. Sidebar & Navigation
   5. Topbar
   6. Cards & Info Components
   7. Forms & Inputs
   8. Buttons
   9. Tables
   10. Alerts & Badges
   11. Specific Pages (Dashboard, Show, Login, etc.)
   12. Components (Cookie, Footer, Notifications, etc.)
   13. Utilities
   14. Responsive: Tablet (≤1024px)
   15. Responsive: Mobile (≤768px)
   16. Responsive: Small Mobile (≤480px)
   17. Print
   ================================================================ */

/* ================================================================
   1. RESET & VARIABLES
   ================================================================ */
:root {
    --ccir-green: #1A472A;
    --ccir-green-light: #2d5a3d;
    --ccir-gold: #C9A854;
    --ccir-gold-hover: #B8973F;
    --ccir-dark: #1C1F1C;
    --ccir-dark-alt: #2D302D;
    --ccir-bg: #F8F8F8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --green-100: #DCFCE7;
    --red-100: #FEE2E2;
    --amber-100: #FEF3C7;
    --blue-100: #DBEAFE;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #3b82f6;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); color: var(--gray-800); line-height: 1.6; background: var(--ccir-bg); }
a { color: var(--ccir-green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ================================================================
   2. TYPOGRAPHY & BASE
   ================================================================ */
h1 { font-size: 1.5rem; font-weight: 700; color: var(--ccir-dark); margin-bottom: 0.5rem; }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--ccir-dark); margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 0.5rem; }
small { font-size: 0.875rem; }

/* ================================================================
   3. LAYOUT SYSTEM
   ================================================================ */

/* --- Shared wrapper pattern (admin, socio, amici) --- */
.admin-wrapper, .socio-wrapper, .amici-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Main content area --- */
.admin-main, .socio-main, .amici-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--ccir-bg);
}

.admin-content, .socio-content, .amici-content {
    flex: 1;
    padding: 1.5rem;
}

/* --- Overlay for mobile sidebar --- */
.admin-overlay, .socio-overlay, .amici-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}
.admin-overlay.active, .socio-overlay.active, .amici-overlay.active {
    display: block;
}

/* --- Public layout --- */
.public-header {
    background: var(--ccir-dark);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.public-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.public-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.public-logo img { height: 35px; width: auto; }
.public-nav { display: flex; gap: 1rem; align-items: center; }
.public-nav-link { color: #C4C6C4; font-size: 0.9rem; text-decoration: none; padding: 0.5rem; }
.public-nav-link:hover { color: white; text-decoration: none; }
.public-nav-link.active { color: var(--ccir-gold); }
.public-menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.public-mobile-nav { display: none; }
.public-mobile-nav.open { display: flex; flex-direction: column; background: var(--ccir-dark); padding: 1rem; }
.public-main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }
.public-footer { background: var(--ccir-dark); color: var(--gray-400); padding: 2rem 1rem; text-align: center; margin-top: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ================================================================
   4. SIDEBAR & NAVIGATION
   ================================================================ */
.admin-sidebar, .socio-sidebar, .amici-sidebar {
    width: 260px;
    background: var(--ccir-dark);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--ccir-dark-alt);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}
.sidebar-logo-img { height: 40px; }
.sidebar-logo-text { font-size: 1.25rem; font-weight: 700; color: var(--ccir-gold); }
.sidebar-close {
    display: none;
    background: none; border: none;
    color: #9A9D9A; font-size: 1.5rem; cursor: pointer;
}

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.nav-section {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.7rem; font-weight: 600;
    color: #787B78;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #C4C6C4;
    text-decoration: none; font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.nav-link:hover { background: var(--ccir-dark-alt); color: white; text-decoration: none; }
.nav-link.active { background: var(--ccir-dark-alt); color: var(--ccir-gold); border-left-color: var(--ccir-gold); }
.nav-icon { width: 1.25rem; text-align: center; }
.nav-badge {
    margin-left: auto;
    background: #F59E0B; color: var(--ccir-dark);
    font-size: 0.7rem; font-weight: 600;
    padding: 0.15rem 0.5rem; border-radius: 10px;
}
.nav-divider { border-top: 1px solid var(--ccir-dark-alt); margin: 1rem 0; }
.nav-logout-form { padding: 0; margin: 0; }
.nav-logout { color: #EF4444 !important; width: 100%; background: none; border: none; cursor: pointer; text-align: left; }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--ccir-dark-alt);
    font-size: 0.75rem; color: #787B78;
    text-align: center;
}

/* ================================================================
   5. TOPBAR
   ================================================================ */
.admin-topbar, .socio-topbar, .amici-topbar {
    background: white;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #E2E3E2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-toggle {
    display: none;
    background: none; border: none;
    font-size: 1.5rem; cursor: pointer;
}
.topbar-title { font-size: 1.25rem; font-weight: 600; color: var(--ccir-dark); margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user { font-size: 0.875rem; color: #787B78; }

.lang-select {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--ccir-bg); border: 1px solid #E2E3E2;
    border-radius: var(--radius-sm);
    font-size: 0.875rem; color: var(--ccir-dark);
    text-decoration: none;
}
.lang-select:hover { border-color: var(--ccir-gold); text-decoration: none; }

/* ================================================================
   6. CARDS & INFO COMPONENTS
   ================================================================ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
    font-weight: 600;
}
.card-body { padding: 1.5rem; }
.card-danger { border: 1px solid #fecaca; }

/* Info grid (3-column layout for detail pages) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.info-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}
.info-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-500);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 0.8rem; color: var(--gray-500); flex-shrink: 0; min-width: 100px; }
.info-value { font-size: 0.9rem; color: var(--gray-800); text-align: right; word-break: break-word; }

/* Socio header (green card on detail page) */
.socio-header {
    background: linear-gradient(135deg, var(--ccir-green) 0%, var(--ccir-green-light) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    max-width: 100%;
}
.socio-header h1 { font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 0.5rem; word-break: break-word; }
.socio-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; opacity: 0.9; }
.socio-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* Referenti list */
.referenti-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.referente-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 1rem; }
.referente-nome { font-weight: 600; font-size: 0.9rem; }
.referente-ruolo { font-size: 0.8rem; color: var(--gray-500); }

/* Stats grid (dashboard) */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 700; color: var(--ccir-green); }
.stat-label { font-size: 0.8rem; color: var(--gray-500); }

/* Activity items */
.activity-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1.25rem; }
.activity-time { font-size: 0.75rem; color: var(--gray-400); }

/* Section title */
.section-title {
    font-size: 1rem; font-weight: 600;
    color: var(--ccir-dark);
    display: flex; align-items: center; gap: 0.5rem;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

/* ================================================================
   7. FORMS & INPUTS
   ================================================================ */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #404340; margin-bottom: 0.375rem; }
.form-input, .form-select, .form-textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"],
input[type="date"], input[type="datetime-local"],
select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}
.form-input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ccir-gold);
    box-shadow: 0 0 0 3px rgba(201,168,84,0.15);
}
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.25rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.25rem; }
.form-required::after { content: ' *'; color: var(--danger); }
.inline-form { display: inline; }

/* Checkbox/Radio */
.checkbox-label { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ccir-green); margin-top: 0.2rem; }

/* ================================================================
   8. BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; opacity: 0.9; }
.btn:disabled, .btn.btn-locked { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--ccir-green); color: white; }
.btn-primary:hover { background: var(--ccir-green-light); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #218838; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c82333; }
.btn-warning { background: var(--warning); color: #000; }
.btn-warning:hover { background: #e0a800; }
.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #2563eb; }
.btn-gold { background: var(--ccir-gold); color: #000; }
.btn-gold:hover { background: var(--ccir-gold-hover); }
.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
    color: var(--ccir-green);
}
.btn-outline:hover { background: var(--ccir-green); color: white; }
.btn-login {
    width: 100%; padding: 0.875rem;
    background: var(--ccir-gold); color: white;
    border: none; border-radius: var(--radius-md);
    font-size: 1rem; font-weight: 600;
    cursor: pointer; margin-top: 0.5rem;
}
.btn-login:hover { background: var(--ccir-gold-hover); }

/* Sizes */
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* ================================================================
   9. TABLES
   ================================================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    background: white;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table th {
    background: var(--gray-50);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-600);
}
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* ================================================================
   10. ALERTS & BADGES
   ================================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}
.alert-success { background: var(--green-100); border: 1px solid #BBF7D0; color: #166534; }
.alert-error   { background: var(--red-100); border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: var(--amber-100); border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: var(--blue-100); border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-secondary { background: #e2e3e5; border: 1px solid #d6d8db; color: #383d41; }
.alert-inline  { margin: 0; padding: 0.5rem 1rem; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}
.badge-stato {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status-specific badge colors */
.badge-attivo, .bg-success { background: #DEF7EC; color: #03543F; }
.badge-in_attesa_cda { background: #E0F2FE; color: #075985; }
.badge-in_attesa_pagamento { background: var(--amber-100); color: #92400E; }
.badge-sospeso, .bg-warning { background: #FEF3C7; color: #92400E; }
.badge-scaduto { background: #FEE2E2; color: #991B1B; }
.badge-dimissionario, .badge-ex_socio, .badge-cessato, .badge-dimesso, .bg-secondary { background: var(--gray-200); color: var(--gray-700); }
.badge-da_attivare { background: #E0E7FF; color: #3730A3; }
.bg-info { background: var(--blue-100); color: #1E40AF; }

/* ================================================================
   11. SPECIFIC PAGE COMPONENTS
   ================================================================ */

/* --- Login pages --- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ccir-dark) 0%, #1a1a2e 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.login-container { width: 100%; max-width: 400px; }
.login-card { background: white; border-radius: var(--radius-xl); padding: 2rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4); }
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { height: 50px; }
.login-logo-icon {
    width: 60px; height: 60px;
    background: var(--ccir-gold);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem; color: white; font-weight: 700;
}
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header h1 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--ccir-dark); margin: 0 0 0.25rem; }
.login-header p { color: #787B78; font-size: 0.9rem; margin: 0; }
.login-back { margin-top: 1.5rem; text-align: center; }
.login-back a { color: rgba(255,255,255,0.7); font-size: 0.875rem; text-decoration: none; }
.login-back a:hover { color: white; }
.login-footer { font-size: 0.75rem; color: var(--gray-400); text-align: center; margin-top: 1rem; }
.lang-toggle {
    position: fixed; top: 1rem; right: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    color: white; font-size: 0.875rem;
    text-decoration: none;
}
.lang-toggle:hover { background: rgba(255,255,255,0.2); text-decoration: none; }
.forgot-link { display: block; text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--gray-500); }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

/* --- Quota/Document boxes on show page --- */
.quota-status-box { padding: 1rem; border-radius: var(--radius-lg); margin-bottom: 1rem; border-left: 4px solid var(--gray-300); }
.quota-paid { background: #f0f7f0; border-left-color: var(--success); }
.quota-unpaid { background: #fff8e6; border-left-color: var(--warning); }
.quota-status-title { margin: 0; font-weight: bold; }
.quota-status-detail { margin: 0.5rem 0 0; font-size: 0.9rem; color: #666; }

.tessera-number-box { background: #f0f7f0; padding: 1rem; border-radius: var(--radius-lg); margin-bottom: 1rem; }
.tessera-number { font-size: 1.5rem; font-weight: bold; color: var(--ccir-green); margin: 0.5rem 0; }

/* --- Workflow actions (button groups on detail pages) --- */
.workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* --- Membership dashboard banner --- */
.membership-banner { padding: 1rem 1.5rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; }
.membership-banner-success { background: var(--green-100); border: 1px solid #BBF7D0; }
.membership-banner-warning { background: var(--amber-100); border: 1px solid #FDE68A; }

/* ================================================================
   12. COMPONENTS
   ================================================================ */

/* --- Cookie banner --- */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--ccir-dark);
    color: white;
    padding: 1rem 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}
.cookie-banner-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cookie-banner-text { flex: 1; font-size: 0.85rem; line-height: 1.5; }
.cookie-banner-actions { display: flex; gap: 0.5rem; }
.cookie-accept-btn {
    background: var(--ccir-gold); color: var(--ccir-dark);
    border: none; padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm); font-weight: 600;
    cursor: pointer; font-size: 0.85rem;
}
.cookie-accept-btn:hover { background: var(--ccir-gold-hover); }
.cookie-link { color: var(--ccir-gold); text-decoration: underline; }

/* --- Legal footer --- */
.legal-footer-ccir {
    background: var(--ccir-dark);
    color: #a0a0a0;
    padding: 1.5rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: auto;
    width: 100%;
}
.legal-footer-container { max-width: 1200px; margin: 0 auto; text-align: center; }
.legal-footer-info {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem; padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}
.legal-footer-company { display: flex; flex-direction: column; gap: 0.25rem; }
.legal-footer-address { font-size: 0.75rem; }
.legal-footer-contacts { display: flex; gap: 1rem; }
.legal-footer-contacts a { color: var(--ccir-gold); text-decoration: none; }
.legal-footer-fiscal { display: flex; gap: 1rem; font-size: 0.75rem; }
.legal-footer-links { margin-top: 0.75rem; }
.legal-footer-links a { color: #a0a0a0; text-decoration: none; margin: 0 0.5rem; }
.legal-footer-links a:hover { color: white; }
.legal-footer-sep { color: #555; margin: 0 0.25rem; }
.legal-footer-copyright { margin-top: 0.75rem; font-size: 0.75rem; color: #666; }

/* --- Notifications dropdown --- */
.notif-menu { position: relative; }
.notif-toggle { background: none; border: none; cursor: pointer; position: relative; font-size: 1.25rem; padding: 0.25rem; }
.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: white;
    font-size: 0.65rem; font-weight: 700;
    min-width: 16px; height: 16px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.notif-dropdown {
    display: none; position: absolute; top: 100%; right: 0;
    width: 360px; max-height: 480px;
    background: white; border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid var(--gray-200);
    z-index: 200; overflow: hidden;
}
.notif-dropdown.show { display: block; }
.notif-header { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.notif-title { font-weight: 600; font-size: 0.9rem; }
.notif-mark-read { font-size: 0.75rem; color: var(--ccir-green); cursor: pointer; background: none; border: none; }
.notif-list { overflow-y: auto; max-height: 350px; }
.notif-item { display: flex; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100); transition: background 0.2s; cursor: pointer; }
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: #f0f7ff; }
.notif-item-icon { font-size: 1.25rem; flex-shrink: 0; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-size: 0.8rem; font-weight: 500; }
.notif-item-message { font-size: 0.75rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item-time { font-size: 0.7rem; color: var(--gray-400); margin-top: 0.15rem; }
.notif-empty { padding: 2rem; text-align: center; color: var(--gray-400); }
.notif-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.notif-footer { padding: 0.5rem 1rem; border-top: 1px solid var(--gray-200); text-align: center; }
.notif-footer a { font-size: 0.8rem; color: var(--ccir-green); text-decoration: none; font-weight: 500; }

/* --- Language selector --- */
.lang-selector { position: relative; }
.lang-btn { padding: 0.35rem 0.75rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: white; cursor: pointer; font-size: 0.85rem; }
.lang-btn.active { border-color: var(--ccir-gold); background: #FFFBEB; }
.lang-dropdown {
    display: none; position: absolute; top: 100%; right: 0;
    background: white; border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    min-width: 120px; z-index: 200;
}
.lang-dropdown.open { display: block; }
.lang-dropdown .lang-btn { display: block; width: 100%; text-align: left; border: none; border-radius: 0; }
.lang-dropdown .check { color: var(--ccir-gold); margin-left: 0.5rem; }
.lang-wrap { display: flex; align-items: center; gap: 0.5rem; }

/* ================================================================
   13. UTILITIES
   ================================================================ */

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Grid */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* Text */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--gray-500); }
.text-gray-500 { color: var(--gray-500); }
.text-blue-600 { color: #2563EB; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Borders & Backgrounds */
.border { border: 1px solid var(--gray-200); }
.border-gray-100 { border-color: var(--gray-100); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.bg-white { background: white; }
.bg-gray-50 { background: var(--gray-50); }
.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.transition { transition: all 0.2s ease; }
.cursor-pointer { cursor: pointer; }
.no-print { }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Logo in views */
.logo-azienda { max-height: 80px; max-width: 200px; object-fit: contain; }

/* Progress bar */
.progress-bar { background: var(--gray-200); border-radius: 9999px; overflow: hidden; height: 0.5rem; }
.progress-bar-fill { height: 100%; border-radius: 9999px; transition: width 0.3s; }

/* ================================================================
   14. RESPONSIVE: TABLET (≤1024px)
   ================================================================ */
@media (max-width: 1024px) {
    .admin-sidebar, .socio-sidebar, .amici-sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
    }
    .admin-sidebar.open, .socio-sidebar.open, .amici-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close { display: block; }
    
    .admin-main, .socio-main, .amici-main { margin-left: 0; }
    .topbar-toggle { display: block; }
    .topbar-user { display: none; }
    .admin-content, .socio-content, .amici-content { padding: 1rem; }
    
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   15. RESPONSIVE: MOBILE (≤768px)
   ================================================================ */
@media (max-width: 768px) {
    .admin-topbar, .socio-topbar, .amici-topbar { padding: 0.5rem 1rem; }
    .topbar-title { font-size: 1rem; }
    
    h1 { font-size: 1.25rem; }
    h2 { font-size: 1.1rem; }
    
    .info-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    
    .card-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    
    .table-responsive table { min-width: 500px; }
    .table th, .table td { padding: 0.5rem; font-size: 0.8rem; white-space: nowrap; }
    
    .btn-group, .workflow-actions { flex-direction: column; width: 100%; }
    .btn-group .btn, .workflow-actions .btn,
    .workflow-actions a.btn, .workflow-actions span.btn,
    .workflow-actions .inline-form { width: 100%; }
    .workflow-actions .inline-form .btn { width: 100%; display: flex; justify-content: center; }
    
    .socio-header .flex { flex-direction: column; }
    .socio-header h1 { font-size: 1.15rem; }
    .socio-meta { flex-direction: column; gap: 0.25rem; font-size: 0.8rem; }
    .socio-actions { flex-direction: column; width: 100%; }
    .socio-actions .btn, .socio-actions form, .socio-actions .inline-form { width: 100%; }
    .socio-actions form .btn, .socio-actions .inline-form .btn { width: 100%; display: flex; justify-content: center; }
    
    .referenti-list { grid-template-columns: 1fr; }
    
    .notif-dropdown { width: 300px; right: -80px; }
    
    .legal-footer-info { flex-direction: column; align-items: center; gap: 0.75rem; }
    .legal-footer-contacts, .legal-footer-fiscal { flex-direction: column; align-items: center; gap: 0.25rem; }
    
    .public-nav { display: none; }
    .public-menu-toggle { display: block; }
}

/* ================================================================
   16. RESPONSIVE: SMALL MOBILE (≤480px)
   ================================================================ */
@media (max-width: 480px) {
    .admin-content, .socio-content, .amici-content { padding: 0.5rem; }
    .p-4 { padding: 0.5rem; }
    .p-6 { padding: 0.75rem; }
    
    .card { border-radius: var(--radius-md); }
    .card-body { padding: 1rem; }
    
    .socio-header { padding: 1rem; }
    .socio-header h1 { font-size: 1.05rem; }
    .info-card { padding: 1rem; }
    
    .quota-status-box { padding: 0.75rem; }
    .quota-status-title { font-size: 0.85rem; }
    .tessera-number { font-size: 1.1rem; }
    
    .alert { padding: 0.65rem; font-size: 0.8rem; }
    .section-title { font-size: 0.85rem; }
    .btn-sm { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
    .btn-xs { padding: 0.15rem 0.35rem; font-size: 0.7rem; }
    .badge, .badge-stato { font-size: 0.7rem; padding: 0.15rem 0.4rem; }
    
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-number { font-size: 1.5rem; }
    
    .btn-danger { width: 100%; text-align: center; }
    
    .notif-dropdown { width: 280px; right: -100px; }
    
    .cookie-banner-content { flex-direction: column; gap: 0.5rem; }
}

/* ================================================================
   17. RESPONSIVE: Tailwind-like breakpoint utilities
   ================================================================ */
@media (min-width: 641px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:items-start { align-items: flex-start; }
    .md\:items-center { align-items: center; }
    .md\:justify-between { justify-content: space-between; }
    .md\:block { display: block; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:gap-4 { gap: 1rem; }
    .md\:gap-6 { gap: 1.5rem; }
    .md\:col-span-2 { grid-column: span 2; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ================================================================
   18. PRINT
   ================================================================ */
@media print {
    .admin-sidebar, .socio-sidebar, .amici-sidebar,
    .admin-topbar, .socio-topbar, .amici-topbar,
    .admin-overlay, .socio-overlay, .amici-overlay,
    .no-print, .btn, .topbar-toggle { display: none !important; }
    .admin-main, .socio-main, .amici-main { margin-left: 0; }
    .admin-content, .socio-content, .amici-content { padding: 0; }
    body { background: white; }
}


/* ================================================================
   TAILWIND-LIKE UTILITIES (from view usage analysis)
   ================================================================ */

/* --- Sizing --- */
.w-full { width: 100%; } .w-100 { width: 100%; } .w-auto { width: auto; }
.w-0\.5 { width: 0.125rem; } .w-1 { width: 0.25rem; } .w-2 { width: 0.5rem; }
.w-4 { width: 1rem; } .w-8 { width: 2rem; } .w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; } .w-12 { width: 3rem; } .w-16 { width: 4rem; }
.w-20 { width: 5rem; } .w-32 { width: 8rem; } .w-48 { width: 12rem; }
.h-2 { height: 0.5rem; } .h-4 { height: 1rem; } .h-6 { height: 1.5rem; }
.h-8 { height: 2rem; } .h-9 { height: 2.25rem; } .h-10 { height: 2.5rem; }
.h-12 { height: 3rem; } .h-16 { height: 4rem; } .h-20 { height: 5rem; }
.h-32 { height: 8rem; } .h-64 { height: 16rem; } .h-72 { height: 18rem; }
.h-96 { height: 24rem; } .h-full { height: 100%; }
.min-h-screen { min-height: 100vh; } .min-w-0 { min-width: 0; }
.min-w-\[80px\] { min-width: 80px; } .min-w-\[150px\] { min-width: 150px; }
.max-w-xs { max-width: 20rem; } .max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; } .max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; } .max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; } .max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; } .max-w-6xl { max-width: 72rem; }
.max-w-none { max-width: none; }
.max-h-60 { max-height: 15rem; } .max-h-96 { max-height: 24rem; }
.max-h-\[500px\] { max-height: 500px; } .max-h-\[600px\] { max-height: 600px; }
.max-h-screen { max-height: 100vh; }

/* --- Spacing --- */
.p-0 { padding: 0; } .p-1 { padding: 0.25rem; } .p-3 { padding: 0.75rem; }
.p-5 { padding: 1.25rem; } .p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-3 { padding-top: 0.75rem; } .pt-4 { padding-top: 1rem; } .pt-6 { padding-top: 1.5rem; }
.pb-2 { padding-bottom: 0.5rem; } .pb-4 { padding-bottom: 1rem; } .pb-6 { padding-bottom: 1.5rem; }
.pl-10 { padding-left: 2.5rem; } .pr-4 { padding-right: 1rem; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; } .mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.ml-1 { margin-left: 0.25rem; } .ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; } .ml-auto { margin-left: auto; }
.mr-1 { margin-right: 0.25rem; } .mr-2 { margin-right: 0.5rem; }
.mt-3 { margin-top: 0.75rem; } .mt-12 { margin-top: 3rem; }
.-mb-6 { margin-bottom: -1.5rem; } .-mx-6 { margin-left: -1.5rem; margin-right: -1.5rem; }
.-top-12 { top: -3rem; }
.gap-3 { gap: 0.75rem; } .gap-5 { gap: 1.25rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* --- Flexbox & Grid extras --- */
.flex-1 { flex: 1; } .flex-shrink-0 { flex-shrink: 0; }
.inline-flex { display: inline-flex; }
.items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-end { justify-content: flex-end; } .self-end { align-self: flex-end; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.col-span-2 { grid-column: span 2; }
.cols-2 { columns: 2; }
.divide-y > * + * { border-top: 1px solid var(--gray-200); }
.divide-gray-100 > * + * { border-color: var(--gray-100); }
.d-grid { display: grid; }

/* --- Text & Font --- */
.text-base { font-size: 1rem; } .text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; } .text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; } .text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-left { text-align: left; }
.font-medium { font-weight: 500; } .font-normal { font-weight: 400; }
.font-mono { font-family: 'Courier New', monospace; }
.uppercase { text-transform: uppercase; } .capitalize { text-transform: capitalize; }
.italic { font-style: italic; }
.leading-none { line-height: 1; } .leading-tight { line-height: 1.25; }
.tracking-wide { letter-spacing: 0.025em; }
.whitespace-nowrap { white-space: nowrap; } .whitespace-pre-line { white-space: pre-line; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Colors: Text --- */
.text-white { color: white; }
.text-gray-300 { color: var(--gray-300); } .text-gray-400 { color: var(--gray-400); }
.text-gray-600 { color: var(--gray-600); } .text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); } .text-gray-900 { color: #111827; }
.text-green-600 { color: #16a34a; } .text-green-700 { color: #15803d; } .text-green-800 { color: #166534; }
.text-red-500 { color: #ef4444; } .text-red-600 { color: #dc2626; } .text-red-700 { color: #b91c1c; }
.text-blue-700 { color: #1d4ed8; } .text-blue-800 { color: #1e40af; }
.text-amber-600 { color: #d97706; } .text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; } .text-amber-300 { color: #fcd34d; }
.text-orange-500 { color: #f97316; }
.text-purple-600 { color: #9333ea; } .text-purple-700 { color: #7e22ce; }
.text-rose-600 { color: #e11d48; } .text-rose-900 { color: #881337; }
.text-primary { color: var(--ccir-green); } .text-ccir-green { color: var(--ccir-green); }

/* --- Colors: Background --- */
.bg-black { background: #000; }
.bg-gray-100 { background: var(--gray-100); } .bg-gray-200 { background: var(--gray-200); }
.bg-gray-400 { background: var(--gray-400); } .bg-gray-900 { background: #111827; }
.bg-green-50 { background: #f0fdf4; } .bg-green-100 { background: #dcfce7; }
.bg-red-50 { background: #fef2f2; } .bg-red-100 { background: #fee2e2; }
.bg-blue-50 { background: #eff6ff; } .bg-blue-100 { background: #dbeafe; }
.bg-amber-50 { background: #fffbeb; } .bg-amber-100 { background: #fef3c7; }
.bg-purple-50 { background: #faf5ff; } .bg-purple-100 { background: #f3e8ff; }
.bg-ccir-dark { background: var(--ccir-dark); } .bg-ccir-green { background: var(--ccir-green); }
.bg-gradient-green { background: linear-gradient(135deg, var(--ccir-green), var(--ccir-green-light)); }
.bg-primary { background: var(--ccir-green); } .bg-danger { background: var(--danger); }
.bg-opacity-50 { --tw-bg-opacity: 0.5; } .bg-opacity-90 { --tw-bg-opacity: 0.9; }

/* --- Colors: Border --- */
.border-0 { border: none; } .border-2 { border-width: 2px; }
.border-b { border-bottom: 1px solid var(--gray-200); }
.border-b-2 { border-bottom: 2px solid var(--gray-200); }
.border-t { border-top: 1px solid var(--gray-200); }
.border-y { border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.border-l-4 { border-left: 4px solid var(--gray-300); }
.border-dashed { border-style: dashed; } .border-transparent { border-color: transparent; }
.border-white { border-color: white; }
.border-gray-200 { border-color: var(--gray-200); } .border-gray-300 { border-color: var(--gray-300); }
.border-green-200 { border-color: #bbf7d0; } .border-green-300 { border-color: #86efac; }
.border-amber-200 { border-color: #fde68a; } .border-amber-300 { border-color: #fcd34d; }
.border-blue-200 { border-color: #bfdbfe; } .border-ccir-green { border-color: var(--ccir-green); }

/* --- Position & Display --- */
.relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; }
.top-0 { top: 0; } .top-4 { top: 1rem; } .bottom-0 { bottom: 0; }
.left-2 { left: 0.5rem; } .left-4 { left: 1rem; }
.right-0 { right: 0; } .right-4 { right: 1rem; } .inset-0 { inset: 0; }
.z-50 { z-index: 50; }
.overflow-x-auto { overflow-x: auto; } .overflow-y-auto { overflow-y: auto; }
.object-cover { object-fit: cover; } .object-contain { object-fit: contain; }

/* --- Borders & Effects --- */
.rounded-xl { border-radius: 0.75rem; } .rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; } .rounded-full { border-radius: 9999px; }
.rounded-b-lg { border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.shadow-sm { box-shadow: var(--shadow-sm); } .shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.opacity-70 { opacity: 0.7; } .opacity-80 { opacity: 0.8; } .opacity-90 { opacity: 0.9; }
.cursor-default { cursor: default; }
.transform { transform: translateZ(0); }
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.transition-shadow { transition: box-shadow 0.2s; }
.duration-200 { transition-duration: 200ms; }

/* --- Lists --- */
.list-disc { list-style-type: disc; }
.list-decimal { list-style-type: decimal; }
.list-inside { list-style-position: inside; }
.list-unstyled { list-style: none; padding-left: 0; }

/* --- Bootstrap compat --- */
.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.col-md-4 { flex: 0 0 33.33%; max-width: 33.33%; }
.col-md-8 { flex: 0 0 66.67%; max-width: 66.67%; }
.col-lg-4 { flex: 0 0 33.33%; max-width: 33.33%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-8 { flex: 0 0 66.67%; max-width: 66.67%; }
.small { font-size: 0.875rem; }
.me-2 { margin-right: 0.5rem; }
.justify-content-center { justify-content: center; }
.form-control { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.9rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input { accent-color: var(--ccir-green); }
.form-check-label { font-size: 0.9rem; }

/* ================================================================
   PAGE-SPECIFIC COMPONENTS
   ================================================================ */

/* --- Page header pattern --- */
.page-container { max-width: 100%; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--ccir-dark); margin: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }

/* --- Dashboard --- */
.dash-header { margin-bottom: 1.5rem; }
.dash-title { font-size: 1.5rem; font-weight: 700; color: var(--ccir-dark); }
.dash-subtitle { font-size: 0.9rem; color: var(--gray-500); margin-top: 0.25rem; }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--ccir-green); }
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }

/* --- Job listings (public) --- */
.job-list { display: grid; gap: 1rem; }
.job-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.2s; }
.job-card:hover { box-shadow: var(--shadow-md); }
.job-card-content { padding: 1.5rem; }
.job-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.job-title { font-size: 1.1rem; font-weight: 600; color: var(--ccir-green); }
.job-company { font-size: 0.9rem; color: var(--gray-600); }
.job-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; font-size: 0.85rem; color: var(--gray-500); }
.job-info { margin-top: 0.75rem; font-size: 0.9rem; color: var(--gray-700); }
.job-footer { padding: 1rem 1.5rem; background: var(--gray-50); border-top: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }
.job-actions { display: flex; gap: 0.5rem; }
.job-btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.job-main { max-width: 800px; margin: 0 auto; }

/* --- Candidatura (application) --- */
.cand-header { background: linear-gradient(135deg, var(--ccir-green), var(--ccir-green-light)); color: white; padding: 2rem 1rem; }
.cand-header-inner { max-width: 800px; margin: 0 auto; }
.cand-main { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem; }
.cand-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); margin-bottom: 1rem; }
.cand-card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-100); font-weight: 600; }
.cand-card-body { padding: 1.5rem; }
.cand-back { margin-top: 1rem; }

/* --- Amici cards --- */
.amico-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1rem; }
.amico-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.amico-card-name { font-weight: 600; font-size: 1rem; }
.amico-card-email { font-size: 0.85rem; color: var(--gray-500); }
.amico-card-row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.35rem 0; border-bottom: 1px solid var(--gray-100); }
.amico-card-label { color: var(--gray-500); }
.amico-card-actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; }

/* --- Documents --- */
.doc-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1rem; }
.doc-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.doc-card-icon { font-size: 1.5rem; }
.doc-card-name { font-weight: 600; }
.doc-card-label { font-size: 0.8rem; color: var(--gray-500); }
.doc-card-size { font-size: 0.75rem; color: var(--gray-400); }
.doc-card-row { display: flex; justify-content: space-between; font-size: 0.85rem; }
.doc-card-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.doc-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Profile completion --- */
.profile-completion { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; }
.profile-completion-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.profile-completion-title { font-weight: 600; }
.profile-completion-percent { font-size: 1.5rem; font-weight: 700; color: var(--ccir-green); }
.profile-completion-mini { font-size: 0.85rem; }
.profile-completion-tips { margin-top: 1rem; }
.completion-tip { font-size: 0.85rem; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-100); }
.progress-bar-container { background: var(--gray-200); border-radius: 9999px; overflow: hidden; height: 0.5rem; }

/* --- Profile quick card (socio dashboard) --- */
.profile-quick-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; }
.profile-quick-section { display: flex; gap: 1.5rem; align-items: flex-start; }
.profile-quick-left { flex-shrink: 0; }
.profile-quick-center { flex: 1; min-width: 0; }
.profile-quick-right { text-align: right; }
.profile-quick-logo { width: 80px; height: 80px; object-fit: contain; border-radius: var(--radius-md); }
.profile-quick-logo-placeholder { width: 80px; height: 80px; background: var(--gray-100); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.profile-quick-sector { font-size: 0.85rem; color: var(--gray-500); }
.profile-quick-link { font-size: 0.85rem; color: var(--ccir-green); }

/* --- Consent page --- */
.consent-page { max-width: 800px; margin: 0 auto; }
.consent-header { margin-bottom: 1.5rem; }
.consent-title { font-size: 1.25rem; font-weight: 700; }
.consent-subtitle { font-size: 0.9rem; color: var(--gray-500); margin-top: 0.25rem; }
.consent-section { margin-bottom: 1.5rem; }
.consent-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 0.75rem; }
.consent-card-header { display: flex; justify-content: space-between; align-items: center; }
.consent-card-title { font-weight: 600; font-size: 0.95rem; }
.consent-card-desc { font-size: 0.85rem; color: var(--gray-500); margin-top: 0.25rem; }
.consent-toggle { display: flex; align-items: center; gap: 0.5rem; }
.consent-status { font-size: 0.75rem; }
.consent-date { font-size: 0.75rem; color: var(--gray-400); margin-top: 0.25rem; }
.consent-required { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1rem; }
.consent-required-title { font-weight: 600; font-size: 0.9rem; }
.consent-required-desc { font-size: 0.85rem; color: var(--gray-500); }
.consent-info { font-size: 0.85rem; color: var(--gray-500); }
.consent-item { padding: 0.5rem 0; border-bottom: 1px solid var(--gray-100); }
.consent-label { font-size: 0.85rem; }
.consent-req { color: var(--danger); font-size: 0.75rem; }

/* --- Toggle switch --- */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--gray-300); border-radius: 24px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
input:checked + .toggle-slider { background: var(--ccir-green); }
input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 0.9rem; cursor: pointer; }

/* --- Registration page --- */
.reg-page { min-height: 100vh; background: var(--gray-50); }
.reg-header { background: var(--ccir-green, #1A472A); color: white; padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; border-radius: var(--radius-lg) var(--radius-lg) 0 0; } .reg-header h1 { margin: 0 0 .25rem; font-size: 1.4rem; color: #fff; } .reg-header p { margin: 0; opacity: .9; font-size: .9rem; color: #fff; } .reg-header > div { text-align: left; }
.reg-container { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.reg-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; transition: box-shadow 0.2s, border-color 0.2s; cursor: pointer; }
.reg-card:hover { box-shadow: var(--shadow-md); border-color: var(--ccir-gold); }
.reg-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.reg-card-btn { margin-top: 1rem; }
.reg-body { max-width: 600px; margin: 0 auto; padding: 1.5rem 1rem; }
.reg-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--gray-500); }
.register-link { text-align: center; margin-top: 1rem; font-size: 0.85rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--gray-500); font-size: 0.9rem; }

/* --- Error pages --- */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gray-50); }
.error-card { text-align: center; padding: 3rem; }
.error-code { font-size: 5rem; font-weight: 700; color: var(--ccir-gold); }
.error-title { font-size: 1.5rem; font-weight: 600; margin-top: 1rem; }
.error-text { color: var(--gray-500); margin-top: 0.5rem; }
.error-btn { margin-top: 1.5rem; }

/* --- Tabs --- */
.tabs, .nav-tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn, .nav-tab { padding: 0.75rem 1.25rem; font-size: 0.9rem; font-weight: 500; color: var(--gray-500); border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tab-btn.active, .nav-tab.active { color: var(--ccir-green); border-bottom-color: var(--ccir-green); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Auth pages (activation etc) --- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--ccir-dark), #1a1a2e); padding: 1rem; }
.auth-card { background: white; border-radius: var(--radius-xl); padding: 2rem; max-width: 420px; width: 100%; }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-title { font-size: 1.25rem; font-weight: 700; text-align: center; }
.auth-subtitle { color: var(--gray-500); text-align: center; font-size: 0.9rem; margin-top: 0.25rem; }

/* --- Settings (socio) --- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.settings-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.settings-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200); font-weight: 600; background: var(--gray-50); }
.settings-card-body { padding: 1.25rem; }

/* --- Email template editor --- */
.editor-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.editor-panel { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.editor-header { padding: 0.75rem 1rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); font-weight: 600; font-size: 0.85rem; }
.editor-body { padding: 1rem; }
.editor-toolbar { display: flex; gap: 0.5rem; padding: 0.5rem; border-bottom: 1px solid var(--gray-200); }
.source-editor, .html-editor, .code-editor { width: 100%; min-height: 300px; font-family: monospace; font-size: 0.85rem; border: none; resize: vertical; }
.preview-frame { width: 100%; min-height: 300px; border: none; }
.var-list, .variabili-list { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.var-tag { display: inline-block; padding: 0.15rem 0.5rem; background: var(--gray-100); border-radius: var(--radius-sm); font-size: 0.75rem; font-family: monospace; cursor: pointer; }
.var-tag:hover { background: var(--ccir-gold); color: white; }

/* --- Categories/Quote grid --- */
.categoria-grid, .quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.categoria-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; }
.categoria-title { font-weight: 600; font-size: 1rem; }
.categoria-price, .price { font-size: 1.5rem; font-weight: 700; color: var(--ccir-green); margin: 0.5rem 0; }
.categoria-desc { font-size: 0.85rem; color: var(--gray-500); }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.empty-text { color: var(--gray-500); font-size: 0.9rem; }

/* --- Highlight/Warning boxes --- */
.highlight-box { background: var(--amber-100); border: 1px solid #FDE68A; border-radius: var(--radius-md); padding: 1rem; }
.warning-box { background: #fff3cd; color: #856404; padding: 1rem 1.5rem; border-radius: var(--radius-md); margin-bottom: 1rem; }
.info-box { background: var(--blue-100); border: 1px solid #BFDBFE; border-radius: var(--radius-md); padding: 1rem; }

/* --- Alert extra --- */
.alert-danger { background: var(--red-100); border: 1px solid #FECACA; color: #991B1B; }

/* --- Badge colors --- */
.badge-success { background: #DEF7EC; color: #03543F; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }
.badge-admin { background: #EDE9FE; color: #5B21B6; }
.badge-amici { background: #DBEAFE; color: #1E40AF; }
.badge-green { background: #DEF7EC; color: #03543F; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-gray { background: var(--gray-200); color: var(--gray-700); }

/* --- Buttons extra --- */
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-save, .btn-submit { background: var(--ccir-green); color: white; padding: 0.75rem 2rem; border: none; border-radius: var(--radius-md, 8px); font-size: 1rem; font-weight: 600; cursor: pointer; }
.btn-save:hover, .btn-submit:hover { background: var(--ccir-green-light); }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- Card extras --- */
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); background: var(--gray-50); }
.card-title { font-weight: 600; font-size: 1rem; }

/* --- Form extras --- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-section { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-200); }
.form-section:last-child { border-bottom: none; }
.form-checkbox { display: flex; align-items: flex-start; gap: 0.5rem; }
.input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: var(--radius-md); }
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.required { color: var(--danger, #dc2626); }
.req { color: var(--danger); }
.file-upload { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 2rem; text-align: center; cursor: pointer; }
.file-upload:hover { border-color: var(--ccir-gold); }
.file-upload-icon { font-size: 2rem; color: var(--gray-400); }
.file-upload-text { font-size: 0.9rem; color: var(--gray-500); margin-top: 0.5rem; }

/* --- Socio specific --- */
.socio-check, .socio-checkbox { display: flex; align-items: center; gap: 0.5rem; }
.topbar-user-info { display: flex; align-items: center; gap: 0.75rem; }
.topbar-company { font-weight: 600; font-size: 0.9rem; }
.topbar-code { font-size: 0.75rem; color: var(--gray-500); }

/* --- Lang tabs --- */
.lang-tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
.lang-tab { padding: 0.5rem 1rem; border: 1px solid var(--gray-300); background: white; cursor: pointer; font-size: 0.85rem; border-radius: var(--radius-sm); }
.lang-tab.active { background: var(--ccir-green); color: white; border-color: var(--ccir-green); }
.lang-content { display: none; }
.lang-content.active { display: block; }
.lang-switch { display: flex; gap: 0.5rem; }

/* --- Legal pages --- */
.legal-page { background: var(--gray-50); min-height: 100vh; }
.legal-header { background: var(--ccir-dark); color: white; padding: 1.5rem 1rem; }
.legal-header-inner { max-width: 800px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.legal-logo img { height: 35px; }
.legal-lang a { color: var(--ccir-gold); text-decoration: none; font-size: 0.85rem; }
.legal-container { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }
.legal-card { background: white; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.legal-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--ccir-dark); }
.legal-subtitle { font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--ccir-green); }
.legal-date, .legal-update { font-size: 0.85rem; color: var(--gray-500); }
.legal-content { font-size: 0.95rem; line-height: 1.7; }
.legal-content p { margin-bottom: 0.75rem; }
.legal-section { margin-bottom: 1.5rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.legal-table th, .legal-table td { padding: 0.5rem; border: 1px solid var(--gray-200); text-align: left; }
.legal-table th { background: var(--gray-50); font-weight: 600; }
.cookie-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.cookie-table th, .cookie-table td { padding: 0.5rem; border: 1px solid var(--gray-200); font-size: 0.85rem; }

/* --- News & Events --- */
.news-item { padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100); }
.news-title { font-weight: 600; font-size: 0.95rem; }
.news-date { font-size: 0.75rem; color: var(--gray-400); }
.event-item { padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100); display: flex; gap: 1rem; }
.event-date { font-weight: 600; color: var(--ccir-green); white-space: nowrap; }
.event-title { font-weight: 500; }

/* --- Service items --- */
.service-item { padding: 1rem; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.service-type { font-size: 0.75rem; text-transform: uppercase; color: var(--gray-500); }
.service-subject { font-weight: 600; }
.service-info { font-size: 0.85rem; color: var(--gray-500); }
.service-status { flex-shrink: 0; }

/* --- Rights section (privacy pages) --- */
.rights-section { margin-top: 1.5rem; }
.rights-title { font-weight: 600; margin-bottom: 0.75rem; }
.rights-list { list-style: none; padding: 0; }
.rights-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; }
.rights-icon { flex-shrink: 0; }
.rights-link { color: var(--ccir-green); }

/* --- Section cards in socio area --- */
.section-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1rem; }
.section-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.section-body { padding: 1.25rem; }
.section-link { font-size: 0.85rem; color: var(--ccir-green); }
.section-business, .section-network, .section-services { padding: 1.5rem; }

/* --- Mobile card (for table alternatives) --- */
.mobile-card { display: none; background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 0.75rem; }
.desktop-table { display: block; }

/* --- Logo preview --- */
.logo-preview-container { position: relative; }
.logo-preview { max-width: 200px; max-height: 100px; object-fit: contain; border-radius: var(--radius-md); border: 1px solid var(--gray-200); }
.logo-placeholder { width: 100px; height: 100px; background: var(--gray-100); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.logo-placeholder-text { font-size: 0.8rem; color: var(--gray-400); }
.logo-icon { font-size: 2rem; }
.logo-img { max-height: 80px; max-width: 200px; object-fit: contain; }

/* --- Event pass --- */
.pass-modal { display: none; }
.pass-modal.show, .pass-modal-backdrop.show { display: block; }
.pass-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; }
.pass-modal-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1001; width: 90%; max-width: 400px; }
.pass-modal-header { padding: 1rem; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.pass-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.pass-modal-body { padding: 1.5rem; text-align: center; }
.pass-modal-footer { padding: 1rem; border-top: 1px solid var(--gray-200); }
.pass-modal-image { max-width: 100%; border-radius: var(--radius-md); }
.pass-modal-logo { max-height: 40px; margin-bottom: 1rem; }
.pass-modal-loading { padding: 2rem; text-align: center; }
.pass-spinner { display: inline-block; width: 30px; height: 30px; border: 3px solid var(--gray-200); border-top-color: var(--ccir-green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pass-preview-mini { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 1rem; text-align: center; }
.pass-logo-mini { max-height: 30px; }
.pass-title-mini { font-size: 0.85rem; font-weight: 600; margin-top: 0.5rem; }
.pass-code-mini { font-family: monospace; font-size: 0.8rem; color: var(--gray-500); }
.pass-qr-placeholder { width: 80px; height: 80px; background: var(--gray-100); margin: 0.5rem auto; border-radius: var(--radius-sm); }

/* --- Prose (rich text content) --- */
.prose { font-size: 0.95rem; line-height: 1.7; }
.prose p { margin-bottom: 0.75rem; }
.prose h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.prose h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.prose li { margin-bottom: 0.25rem; }
.prose a { color: var(--ccir-green); text-decoration: underline; }

/* --- Actions grid (impostazioni) --- */
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }

/* --- Header elements --- */
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.header-logo img { height: 35px; }
.header-right { display: flex; align-items: center; gap: 1rem; }
.header-btn { display: inline-flex; align-items: center; gap: 0.35rem; }

/* --- Separator --- */
.separator { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }

/* --- Group/Details --- */
.group { position: relative; }
.selected { background: var(--gray-100); }

/* ================================================================
   SM BREAKPOINT ADDITIONS (≥640px)
   ================================================================ */
@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:inline { display: inline; }
    .sm\:inline-flex { display: inline-flex; }
    .sm\:hidden { display: none; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:flex-wrap { flex-wrap: wrap; }
    .sm\:flex-none { flex: none; }
    .sm\:items-center { align-items: center; }
    .sm\:items-start { align-items: flex-start; }
    .sm\:items-end { align-items: flex-end; }
    .sm\:justify-between { justify-content: space-between; }
    .sm\:justify-start { justify-content: flex-start; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .sm\:col-span-2 { grid-column: span 2; }
    .sm\:gap-3 { gap: 0.75rem; }
    .sm\:p-3 { padding: 0.75rem; }
    .sm\:p-5 { padding: 1.25rem; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:mb-6 { margin-bottom: 1.5rem; }
    .sm\:space-y-0 > * + * { margin-top: 0; }
    .sm\:text-sm { font-size: 0.875rem; }
    .sm\:text-xl { font-size: 1.25rem; }
    .sm\:text-2xl { font-size: 1.5rem; }
    .sm\:text-3xl { font-size: 1.875rem; }
    .sm\:w-10 { width: 2.5rem; }
    .sm\:w-40 { width: 10rem; }
    .sm\:w-48 { width: 12rem; }
    .sm\:w-auto { width: auto; }
    .sm\:h-10 { height: 2.5rem; }
    .sm\:h-80 { height: 20rem; }
    .sm\:max-w-lg { max-width: 32rem; }
    .sm\:min-w-\[200px\] { min-width: 200px; }
    .sm\:table-cell { display: table-cell; }
}

/* ================================================================
   MD/LG BREAKPOINT ADDITIONS
   ================================================================ */
@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:items-start { align-items: flex-start; }
    .md\:items-center { align-items: center; }
    .md\:justify-between { justify-content: space-between; }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:p-4 { padding: 1rem; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:gap-4 { gap: 1rem; }
    .md\:gap-6 { gap: 1.5rem; }
    .md\:col-span-2 { grid-column: span 2; }
    .md\:col-span-3 { grid-column: span 3; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md\:table-cell { display: table-cell; }
    .md\:text-2xl { font-size: 1.5rem; }
    .md\:text-sm { font-size: 0.875rem; }
    .md\:max-w-md { max-width: 28rem; }
    .mobile-card { display: none; }
    .desktop-table { display: block; }
}

@media (max-width: 767px) {
    .mobile-card { display: block; }
    .desktop-table { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .editor-container { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .col-md-4, .col-md-8, .col-lg-4, .col-lg-6, .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
    .lg\:flex-row { flex-direction: row; }
    .lg\:items-center { align-items: center; }
    .lg\:items-start { align-items: flex-start; }
    .lg\:justify-between { justify-content: space-between; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
    .lg\:grid-cols-7 { grid-template-columns: repeat(7, 1fr); }
    .lg\:col-span-1 { grid-column: span 1; }
    .lg\:col-span-2 { grid-column: span 2; }
    .lg\:col-span-5 { grid-column: span 5; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:table-cell { display: table-cell; }
    .lg\:w-20 { width: 5rem; }
    .lg\:w-24 { width: 6rem; }
    .lg\:w-36 { width: 9rem; }
    .lg\:w-48 { width: 12rem; }
    .lg\:max-w-lg { max-width: 32rem; }
}

/* --- Pseudo-class utilities (hover/focus) --- */
.hover\:bg-gray-50:hover { background: var(--gray-50); }
.hover\:bg-gray-300:hover { background: var(--gray-300); }
.hover\:bg-red-50:hover { background: #fef2f2; }
.hover\:bg-ccir-green:hover { background: var(--ccir-green); }
.hover\:bg-ccir-green-light:hover { background: var(--ccir-green-light); }
.hover\:text-ccir-green:hover { color: var(--ccir-green); }
.hover\:text-gray-700:hover { color: var(--gray-700); }
.hover\:text-white:hover { color: white; }
.hover\:border-ccir-green:hover { border-color: var(--ccir-green); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:shadow-md:hover { box-shadow: var(--shadow-md); }
.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg); }
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }
.focus\:border-ccir-green:focus { border-color: var(--ccir-green); }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(201,168,84,0.3); }
.focus\:ring-ccir-green:focus { box-shadow: 0 0 0 2px rgba(26,71,42,0.3); }
.group:hover .group-hover\:text-ccir-green { color: var(--ccir-green); }


/* --- Remaining missing utilities --- */
.fa-3x { font-size: 3em; }
.fas { display: inline-block; } /* Font Awesome compat */
.login-btn { width: 100%; padding: 0.75rem; background: var(--ccir-gold); color: white; border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; }
.login-form { margin-top: 1.5rem; }
.login-input { width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.9rem; }
.login-logo-img { height: 50px; display: block; margin: 0 auto; }
.login-title { font-size: 1.5rem; font-weight: 700; text-align: center; }
.login-subtitle { font-size: 0.9rem; color: var(--gray-500); text-align: center; }
.notif-icon { font-size: 1.25rem; }
.from-rose-800 { --tw-gradient-from: #9f1239; }
.to-rose-950 { --tw-gradient-to: #4c0519; }


.bg-red-600 { background: #dc2626; }

/* Settings item (impostazioni) */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.settings-item:last-child { border-bottom: none; }
.bg-gray-500 { background: var(--gray-500); }
.bg-green-500 { background: #22c55e; }
.bg-red-500 { background: #ef4444; }
.bg-blue-500 { background: #3b82f6; }
.bg-ccir-gold { background: var(--ccir-gold); }


/* Email template editor enhancements */
.editor-toolbar button {
    background: white;
    border: 1px solid var(--gray-300);
    padding: 0.35rem 0.65rem;
    margin: 0 2px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.editor-toolbar button:hover { background: var(--gray-200); }
.editor-toolbar .separator { color: var(--gray-300); margin: 0 0.35rem; }

.html-editor {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    padding: 1rem;
    background: white;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.html-editor:focus { outline: 2px solid var(--ccir-green); }

.source-editor {
    width: 100%;
    min-height: 400px;
    font-family: monospace;
    font-size: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    resize: vertical;
}

.variabili-list code:hover { background: var(--ccir-green); color: white; cursor: pointer; }


/* ================================================================
   CRITICAL LAYOUT FIX - Prevent ALL overflow
   ================================================================ */

/* The overflow chain must be unbroken: html → body → wrapper → main → content */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

.admin-wrapper, .socio-wrapper, .amici-wrapper {
    overflow-x: hidden;
    max-width: 100vw;
}

.admin-main, .socio-main, .amici-main {
    overflow-x: hidden;
    min-width: 0; /* Critical for flex children */
    max-width: 100vw;
}

.admin-content, .socio-content, .amici-content {
    overflow-x: hidden;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
}

/* Every child container must respect parent bounds */
.admin-content > *, .socio-content > *, .amici-content > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Tables scroll horizontally in their wrapper */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.table-responsive table {
    max-width: none; /* Allow table to be wider than container for scrolling */
}

/* Images never overflow */
img { max-width: 100%; height: auto; }

/* Tables scroll horizontally in their container */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ================================================================
   SOCIO HEADER - Mobile responsive  
   ================================================================ */
.socio-header {
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.socio-header .flex {
    flex-wrap: wrap;
}

/* Badge must be inline, never full-width */
.badge-stato {
    display: inline-block !important;
    width: auto !important;
    max-width: fit-content !important;
}

/* Actions buttons must wrap and fit */
.socio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.socio-actions .btn,
.socio-actions .inline-form,
.socio-actions form {
    flex: 1 1 auto;
    min-width: 0;
}

.socio-actions .inline-form .btn,
.socio-actions form .btn {
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   INFO GRID - Responsive
   ================================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1rem;
}

.info-card {
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
}

.info-value {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    text-align: right;
}

/* ================================================================
   RESPONSIVE: Tablet (≤1024px)
   ================================================================ */
@media (max-width: 1024px) {
    .admin-sidebar, .socio-sidebar, .amici-sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
    }
    .admin-sidebar.open, .socio-sidebar.open, .amici-sidebar.open {
        transform: translateX(0);
    }
    .admin-main, .socio-main, .amici-main {
        margin-left: 0 !important;
    }
    .topbar-toggle { display: block !important; }
    .sidebar-close { display: block !important; }
}

/* ================================================================
   RESPONSIVE: Mobile (≤768px)
   ================================================================ */
@media (max-width: 768px) {
    /* Content padding */
    .admin-content, .socio-content, .amici-content {
        padding: 0.5rem !important;
    }
    .p-4, .md\:p-6 { padding: 0.5rem !important; }

    /* ALL grids → single column */
    .info-grid,
    .stats-grid,
    .settings-grid,
    .actions-grid,
    .categoria-grid,
    .quote-grid,
    .reg-grid,
    .content-grid,
    .editor-container,
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Flex containers → column */
    .page-header,
    .admin-header,
    .socio-header .flex,
    .btn-group,
    .workflow-actions,
    .doc-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Socio header */
    .socio-header {
        padding: 0.75rem !important;
        border-radius: 0.5rem;
    }
    .socio-header h1 {
        font-size: 1.05rem !important;
        word-break: break-word;
    }
    .socio-meta {
        flex-direction: column !important;
        gap: 0.25rem !important;
        font-size: 0.8rem !important;
    }
    .socio-actions {
        flex-direction: column !important;
        gap: 0.35rem !important;
        margin-top: 0.5rem;
    }
    .socio-actions .btn,
    .socio-actions .inline-form,
    .socio-actions form {
        width: 100% !important;
    }
    .socio-actions .btn {
        display: block !important;
        text-align: center !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    .socio-actions .inline-form .btn,
    .socio-actions form .btn {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }

    /* Buttons full width */
    .btn-group .btn,
    .workflow-actions .btn,
    .workflow-actions a,
    .workflow-actions .inline-form {
        width: 100% !important;
    }
    .workflow-actions .inline-form .btn {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }

    /* Tables */
    .table th, .table td {
        padding: 0.4rem !important;
        font-size: 0.78rem !important;
    }

    /* Topbar */
    .admin-topbar, .socio-topbar, .amici-topbar {
        padding: 0.5rem 0.75rem !important;
    }
    .topbar-title { font-size: 0.95rem !important; }
    .topbar-user { display: none; }

    /* Headers */
    h1, .text-2xl { font-size: 1.1rem !important; }
    h2, .text-xl { font-size: 1rem !important; }
    .page-title { font-size: 1.1rem !important; }

    /* Cards */
    .card { border-radius: 0.5rem; }
    .card-body { padding: 0.75rem !important; }
    .card-header { padding: 0.75rem !important; flex-wrap: wrap; }

    /* Info rows */
    .info-row {
        flex-direction: column !important;
        gap: 0.1rem !important;
    }
    .info-label { font-size: 0.75rem !important; }
    .info-value {
        font-size: 0.85rem !important;
        text-align: left !important;
        word-break: break-word !important;
    }

    /* Referenti */
    .referenti-list { grid-template-columns: 1fr !important; }

    /* Section titles */
    .section-title { font-size: 0.9rem !important; }

    /* Notifications */
    .notif-dropdown { width: 280px; right: -100px; }

    /* Forms */
    .form-row { grid-template-columns: 1fr !important; }

    /* Legal footer */
    .legal-footer-info { flex-direction: column; align-items: center; }
    
    /* Mobile card/desktop table toggle */
    .mobile-card { display: block; }
    .desktop-table { display: none; }
    
    /* Bootstrap columns → full width */
    .col-md-4, .col-md-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    /* col-lg stays side-by-side above 768px - stacks only on mobile via max-width:768px rule */
}

/* ================================================================
   RESPONSIVE: Small Mobile (≤480px) 
   ================================================================ */
@media (max-width: 480px) {
    .admin-content, .socio-content, .amici-content {
        padding: 0.35rem !important;
    }
    .socio-header { padding: 0.5rem !important; }
    .socio-header h1 { font-size: 0.95rem !important; }
    .btn-sm {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    .badge, .badge-stato {
        font-size: 0.7rem !important;
        padding: 0.15rem 0.4rem !important;
    }
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
    .admin-sidebar, .socio-sidebar, .amici-sidebar,
    .admin-topbar, .socio-topbar, .amici-topbar,
    .admin-overlay, .socio-overlay, .amici-overlay,
    .socio-actions, .workflow-actions, .btn-group { display: none !important; }
    .admin-main, .socio-main, .amici-main { margin-left: 0 !important; }
    .admin-content { padding: 0 !important; }
}


/* ═══════════════════════════════════════════════════════════
   UTILITY MANCANTI — completamento mini-framework (9 giu 2026)
   Aggiunte per eliminare i layout "ballerini": classi usate nelle
   view ma non definite. Coerenti con palette CCIR.
   ═══════════════════════════════════════════════════════════ */

/* Spacing verticale */
.space-y-1 > * + * { margin-top: .25rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.sm\:space-y-0 > * + * { margin-top: 0; }
.pl-4 { padding-left: 1rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }

/* Divisori */
.divide-y > * + * { border-top: 1px solid var(--gray-200, #e5e7eb); }
.divide-gray-100 > * + * { border-top-color: var(--gray-100, #f3f4f6); }

/* Larghezze min */
.min-w-\[80px\] { min-width: 80px; }
.min-w-\[150px\] { min-width: 150px; }
.sm\:min-w-\[200px\] { min-width: 200px; }
.max-h-\[500px\] { max-height: 500px; overflow-y: auto; }

/* Testo colorato */
.text-amber-500 { color: #f59e0b; }
.text-amber-900 { color: #78350f; }
.text-blue-900 { color: #1e3a8a; }
.text-green-900 { color: #14532d; }

/* Gradienti */
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-from,#f0fdf4), var(--tw-to,#eff6ff)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-from,#f0fdf4), var(--tw-to,#eff6ff)); }
.from-green-50 { --tw-from: #f0fdf4; }
.to-blue-50 { --tw-to: #eff6ff; }

/* Hover / focus states */
.hover\:underline:hover { text-decoration: underline; }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-300:hover { background-color: #d1d5db; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:bg-ccir-green-light:hover { background-color: var(--ccir-green-light, #2d5a3d); }
.hover\:border-ccir-green:hover { border-color: var(--ccir-green, #1A472A); }
.hover\:text-ccir-green:hover { color: var(--ccir-green, #1A472A); }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:text-gray-700:hover { color: #374151; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(26,71,42,.3); }
.focus\:ring-ccir-green:focus { box-shadow: 0 0 0 2px rgba(26,71,42,.4); }
.focus\:border-ccir-green:focus { border-color: var(--ccir-green, #1A472A); }
.group-open\:rotate-180 { transition: transform .2s; }
details[open] .group-open\:rotate-180 { transform: rotate(180deg); }

/* Responsive helpers */
@media (min-width: 640px) {
    .sm\:flex { display: flex; }
    .sm\:gap-2 { gap: .5rem; }
}
@media (min-width: 768px) {
    .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Badge varianti */
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-current { background: var(--ccir-green, #1A472A); color: #fff; }

/* Header componente (job board / pagine pubbliche) */
.header { padding: 16px 0; border-bottom: 1px solid var(--gray-200, #e5e7eb); background: #fff; }
.header-brand { display: flex; align-items: center; gap: 12px; }
/* header-logo: gestito da .header-logo img */
.header-title { font-size: 18px; font-weight: 700; color: var(--ccir-green, #1A472A); }
.header-sub { font-size: 13px; color: var(--gray-500, #6b7280); }

/* Convocazioni - ODG (ordine del giorno) */
.odg-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100,#f3f4f6); }
.odg-num { font-weight: 700; color: var(--ccir-green,#1A472A); min-width: 32px; }
.odg-title { font-weight: 600; }
.odg-desc { font-size: 14px; color: var(--gray-600,#4b5563); }
.odg-item { padding: 8px 0; }

/* Bottoni convocazione (presenza/delega) */
.btn-present { background: #16a34a; color: #fff; }
.btn-absent { background: #dc2626; color: #fff; }
.btn-delega { background: var(--ccir-gold,#C9A854); color: #1C1F1C; }
.btn-resp { background: var(--ccir-green,#1A472A); color: #fff; }
.btn-locked { background: var(--gray-300,#d1d5db); color: var(--gray-500,#6b7280); cursor: not-allowed; }
.response-box { padding: 16px; border-radius: 10px; background: var(--gray-50,#f9fafb); border: 1px solid var(--gray-200,#e5e7eb); }

/* Legal footer (pagine privacy/termini) */
.legal-footer { text-align: center; padding: 24px; color: var(--gray-500,#6b7280); font-size: 13px; }
.legal-logo { height: 36px; opacity: .7; }
.legal-lang a { color: var(--gray-500,#6b7280); text-decoration: none; padding: 0 6px; }

/* Form helpers */
.form-text { font-size: 13px; color: var(--gray-500,#6b7280); margin-top: 4px; }

/* FontAwesome fallback (se FA non caricato, niente quadratini) */
.fa-check::before { content: "\2713"; }
.fa-info-circle::before { content: "\2139"; }
.fa-exclamation-triangle::before { content: "\26A0"; }
.fa-shield-alt::before { content: "\1F6E1"; }

/* Fix allineamento form registrazione (no centratura ereditata) */
.reg-body { text-align: left; }
.reg-body .form-label, .reg-body label { text-align: left; display: block; }
.reg-card:has(.reg-body) { text-align: left; cursor: default; padding: 0; overflow: hidden; }


/* ═══════════ JOB BOARD HEADER FIX (9 giu) ═══════════ */
/* Header sticky bianco della job board pubblica jobs.ccir.it */
header.job-header {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
header.job-header .header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header.job-header .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ccir-green, #1A472A);
    font-weight: 700;
    font-size: 1.05rem;
}
header.job-header .header-logo img { height: 32px; width: auto; }
header.job-header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
header.job-header .lang-select {
    text-decoration: none;
    color: var(--gray-600, #4b5563);
    font-size: .9rem;
    padding: 6px 10px;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 6px;
}
header.job-header .header-btn {
    background: var(--ccir-green, #1A472A);
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
}
header.job-header .header-btn:hover { background: var(--ccir-green-light, #2d5a3d); }

/* Main job board */
.job-main { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.job-main .page-title { margin-bottom: 24px; }
.job-main .page-title h1 { font-size: 1.6rem; color: var(--ccir-dark, #1C1F1C); margin: 0 0 4px; }
.job-main .page-title p { color: var(--gray-500, #6b7280); margin: 0; }
