/* ============================================================
   FEDAIISF — Gestionale Area Riservata
   Brand Colors: Rosso #C40020 | Blu #024B8E | Verde #1C7A3C
   Font: Outfit (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    /* Brand palette */
    --red:          #C40020;
    --red-dark:     #9e001a;
    --red-light:    #fce8eb;
    --blue:         #024B8E;
    --blue-dark:    #013870;
    --blue-light:   #e0ecf8;
    --green:        #1C7A3C;
    --green-light:  #e3f4ea;

    /* UI tokens — Rosso primario, Blu secondario */
    --primary:      var(--red);
    --primary-dark: var(--red-dark);
    --primary-light:var(--red-light);
    --accent:       var(--blue);
    --accent-light: var(--blue-light);

    --bg:           #f0f4f9;
    --surface:      #ffffff;
    --surface-2:    #f7f9fc;
    --border:       rgba(2, 75, 142, 0.10);
    --border-strong:rgba(2, 75, 142, 0.18);

    --text-primary: #111827;
    --text-secondary:#4b5563;
    --text-muted:   #9ca3af;

    --radius-sm:    8px;
    --radius-md:    14px;
    --radius-lg:    20px;
    --radius-xl:    28px;

    --shadow-sm:    0 1px 4px rgba(196,0,32,0.05), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 20px rgba(196,0,32,0.07), 0 1px 4px rgba(0,0,0,0.05);
    --shadow-lg:    0 12px 40px rgba(196,0,32,0.10), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-accent:0 8px 24px rgba(196,0,32,0.28);

    --transition:   all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-head:    'Outfit', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(2,75,142,0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(196,0,32,0.04) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ── Header ─────────────────────────────────────────────── */
.app-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8), var(--shadow-sm);
}

.header-left, .header-right { width: 44px; display: flex; }
.header-right { justify-content: flex-end; }

.logo-container { flex: 1; display: flex; justify-content: center; }
.logo { height: 44px; width: auto; object-fit: contain; }

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.icon-btn:hover {
    background: var(--red-light);
    color: var(--red);
}
.icon-btn svg { width: 20px; height: 20px; }

/* ── Main layout ─────────────────────────────────────────── */
.app-main {
    padding: 24px 16px 60px;
    max-width: 860px;
    margin: 0 auto;
}

/* ── Page header block ───────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
}
.page-header h2 {
    font-family: var(--font-head);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.page-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-top: 4px;
}

/* ── Back link ───────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 7px 14px 7px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: var(--transition);
}
.back-link:hover {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red-dark);
}
.back-link svg { width: 16px; height: 16px; }

/* ── Card base ───────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

/* ── User Card ───────────────────────────────────────────── */
.user-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 0;
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}

.user-card-banner {
    background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 60%, #8a0016 100%);
    padding: 24px 28px 20px;
    padding-right: 110px;          /* spazio per la foto a destra */
    position: relative;
    overflow: hidden;
    min-height: 90px;
}
/* Cerchio decorativo sfondo (rimane, la foto gli va sopra) */
.user-card-banner::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 170px; height: 170px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.user-card-banner::after {
    content: '';
    position: absolute;
    bottom: -20px; left: 40%;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(2,75,142,0.15);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* ── Foto profilo — destra del banner ────────────────────── */
.user-avatar-right {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.35);
    overflow: hidden;
    background: rgba(255,255,255,0.12);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    flex-shrink: 0;
}
.user-avatar-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.user-avatar-right span {
    color: white;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    line-height: 1;
}

/* ── Vecchio avatar (lasciato per compatibilità sidebar) ── */
.user-avatar {
    width: 54px; height: 54px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    backdrop-filter: blur(4px);
}

.user-card-header h2 {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}
.user-badge svg { width: 11px; height: 11px; }

.user-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
@media (max-width: 480px) {
    .user-details { grid-template-columns: 1fr; }
}

.detail-item {
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: background 0.2s;
}
.detail-item:hover { background: var(--surface-2); }
.detail-item:nth-child(2n) { border-right: none; }
.detail-item:last-child, .detail-item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 3px;
    display: flex; align-items: center; gap: 5px;
}
.detail-label svg { width: 11px; height: 11px; color: var(--red); }

.detail-value {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-head);
}
.detail-value.placeholder { color: var(--text-muted); font-weight: 400; font-style: italic; }

/* ── Menu Grid ───────────────────────────────────────────── */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 480px) {
    .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 700px) {
    .menu-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

.menu-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px 12px 18px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--red));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}
.menu-item:hover::after { transform: scaleX(1); }
.menu-item:hover .menu-icon-wrapper {
    background: var(--red);
    color: white;
    transform: scale(1.08);
}

.menu-icon-wrapper {
    width: 52px; height: 52px;
    background: var(--red-light);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--red);
    transition: var(--transition);
}
.menu-icon-wrapper svg { width: 22px; height: 22px; }

.menu-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-secondary);
    font-family: var(--font-head);
    letter-spacing: 0.1px;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: -300px;
    width: 300px; height: 100vh;
    background: var(--surface);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 32px rgba(2,75,142,0.15);
    border-right: 1px solid var(--border);
}
.sidebar.active { left: 0; }

.sidebar-overlay {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(1,25,56,0.45);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.sidebar-logo { height: 36px; }

.sidebar-header .icon-btn {
    color: var(--text-secondary);
    width: 36px; height: 36px;
}
.sidebar-header .icon-btn:hover {
    background: var(--red-light);
    color: var(--red);
}

.sidebar-user {
    padding: 20px;
    display: flex; align-items: center; gap: 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.sidebar-user-avatar {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-head);
}
.sidebar-user-role {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sidebar-menu {
    display: flex; flex-direction: column;
    padding: 10px 0; flex: 1;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 16px 20px 6px;
    font-family: var(--font-head);
}

.sidebar-link {
    display: flex; align-items: center; gap: 13px;
    padding: 11px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-family: var(--font-body);
}
.sidebar-link svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; transition: var(--transition); }
.sidebar-link:hover {
    background: var(--red-light);
    color: var(--red);
    border-left-color: var(--red);
}
.sidebar-link:hover svg { color: var(--red); }
.sidebar-link.active {
    background: var(--red-light);
    color: var(--red);
    border-left-color: var(--red);
    font-weight: 600;
}
.sidebar-link.active svg { color: var(--red); }

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 20px;
}

.sidebar-link.danger { color: var(--red); }
.sidebar-link.danger svg { color: var(--red); }
.sidebar-link.danger:hover {
    background: var(--red-light);
    border-left-color: var(--red);
}

/* ── Page content placeholder ────────────────────────────── */
.page-content {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    min-height: 380px;
    border: 1px solid var(--border);
}
.page-content h2 {
    font-family: var(--font-head);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

/* ── List container (circolari, etc.) ────────────────────── */
.list-container { display: flex; flex-direction: column; gap: 12px; }

.list-item {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    border: 1px solid var(--border);
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.list-item:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.list-item-icon {
    width: 44px; height: 44px;
    background: var(--red-light);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--red); flex-shrink: 0;
}
.list-item-icon svg { width: 20px; height: 20px; }
.list-item-icon.blue-icon { background: var(--blue-light); color: var(--blue); }

.list-item-body { flex: 1; min-width: 0; }
.list-item-title {
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--text-primary);
    font-family: var(--font-head);
    margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-item-meta {
    font-size: 0.79rem;
    color: var(--text-muted);
}

.btn-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; text-decoration: none; flex-shrink: 0;
    transition: var(--transition);
}
.btn-icon:hover { background: var(--blue); color: white; border-color: var(--blue); }
.btn-icon svg { width: 16px; height: 16px; }

/* ── News cards ──────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.news-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.news-card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--blue-light);
}
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-date {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue);
    margin-bottom: 8px;
    font-family: var(--font-head);
}
.news-card-title {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 10px;
}
.news-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}
.news-card-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600; font-size: 0.85rem;
    color: var(--red); text-decoration: none;
    font-family: var(--font-head);
}
.news-card-link svg { width: 14px; height: 14px; }

/* ── Collega card ────────────────────────────────────────── */
.colleghi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}
.collega-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 16px;
    transition: var(--transition);
}
.collega-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.collega-header { display: flex; align-items: center; gap: 14px; }

.collega-avatar {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head);
    font-weight: 700; font-size: 1.1rem;
    flex-shrink: 0;
}

.collega-name {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.collega-sezione {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.75rem;
    color: var(--red);
    background: var(--red-light);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.collega-sezione svg { width: 11px; height: 11px; }

.collega-actions { display: flex; gap: 10px; }
.btn-whatsapp {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    background: #25D366; color: white;
    padding: 11px; border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.85rem; font-weight: 600;
    box-shadow: 0 4px 14px rgba(37,211,102,0.25);
    transition: var(--transition);
}
.btn-whatsapp:hover { background: #1fad56; transform: scale(1.02); }
.btn-whatsapp svg { width: 17px; height: 17px; }

.btn-contact {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); color: var(--text-secondary);
    border-radius: var(--radius-md); text-decoration: none;
    border: 1px solid var(--border); transition: var(--transition);
}
.btn-contact:hover { background: var(--blue-light); color: var(--blue); border-color: var(--blue); }
.btn-contact svg { width: 18px; height: 18px; }

/* ── Appuntamenti ────────────────────────────────────────── */
.appuntamento-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    display: flex; align-items: stretch; gap: 18px;
    transition: var(--transition);
    margin-bottom: 12px;
}
.appuntamento-card:hover {
    border-left-color: var(--blue);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.app-date-block {
    background: var(--red-light);
    min-width: 66px;
    border-radius: var(--radius-md);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 10px;
    color: var(--red);
    flex-shrink: 0;
}
.app-date-month { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; font-family: var(--font-head); }
.app-date-day   { font-size: 1.9rem; font-weight: 800; line-height: 1; font-family: var(--font-head); }

.app-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.app-title {
    font-family: var(--font-head);
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 8px;
}
.app-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.app-meta-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.82rem; color: var(--text-secondary);
}
.app-meta-item svg { width: 13px; height: 13px; color: var(--text-muted); }

/* ── Utilità cards ───────────────────────────────────────── */
.utilita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.utilita-card {
    background: var(--surface);
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center;
    transition: var(--transition);
}
.utilita-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--red);
}
.utilita-card:hover .utilita-icon {
    background: var(--red);
    color: white;
    transform: scale(1.1);
}
.utilita-icon {
    width: 58px; height: 58px;
    background: var(--red-light);
    color: var(--red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    transition: var(--transition);
}
.utilita-icon svg { width: 26px; height: 26px; }
.utilita-name {
    font-family: var(--font-head);
    font-size: 1rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 6px;
}
.utilita-desc { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.4; }

/* ── Search bar ──────────────────────────────────────────── */
.search-bar { position: relative; margin-bottom: 24px; }
.search-bar svg {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); width: 18px; height: 18px; pointer-events: none;
}
.search-bar input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    outline: none; font-family: var(--font-body);
    font-size: 0.95rem; color: var(--text-primary);
    transition: var(--transition);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(196,0,32,0.1);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white; border: none;
    padding: 12px 22px; border-radius: var(--radius-md);
    font-family: var(--font-head);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    box-shadow: var(--shadow-accent);
    transition: var(--transition);
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(196,0,32,0.35);
}
.btn-primary svg { width: 17px; height: 17px; }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--surface); color: var(--red);
    border: 1px solid var(--border);
    padding: 11px 20px; border-radius: var(--radius-md);
    font-family: var(--font-head);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: var(--transition); text-decoration: none;
}
.btn-secondary:hover { background: var(--red-light); border-color: var(--red); }

/* ── Tags / Badges ───────────────────────────────────────── */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    font-family: var(--font-head);
    letter-spacing: 0.2px;
}
.tag-blue  { background: var(--blue-light);  color: var(--blue); }
.tag-red   { background: var(--red-light);   color: var(--red); }
.tag-green { background: var(--green-light); color: var(--green); }
.tag-gray  { background: var(--surface-2);   color: var(--text-muted); }

/* ── Section divider ─────────────────────────────────────── */
.section-title {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state svg {
    width: 48px; height: 48px;
    color: var(--border-strong);
    margin-bottom: 14px;
}
.empty-state p { font-size: 0.92rem; }

/* ── Alert / Messages ────────────────────────────────────── */
.alert {
    padding: 14px 18px; border-radius: var(--radius-md);
    font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-error   { background: var(--red-light);   color: var(--red-dark);  border: 1px solid rgba(196,0,32,0.15); }
.alert-success { background: var(--green-light); color: var(--green);     border: 1px solid rgba(28,122,60,0.15); }
.alert-info    { background: var(--blue-light);  color: var(--blue-dark); border: 1px solid rgba(2,75,142,0.15); }

/* ── Form elements ───────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-family: var(--font-head);
}
.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 0.95rem; color: var(--text-primary);
    outline: none; transition: var(--transition);
}
.form-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(196,0,32,0.1);
}
.form-input::placeholder { color: var(--text-muted); }

.input-wrapper { position: relative; }
.input-icon {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); width: 18px; height: 18px; pointer-events: none;
}
.input-wrapper .form-input { padding-left: 46px; }

/* ── Login page ──────────────────────────────────────────── */
.login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(196,0,32,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(2,75,142,0.06) 0%, transparent 45%),
        #f5f0f1;
    padding: 20px;
}

.login-container {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%; max-width: 430px;
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.6) inset;
    border: 1px solid rgba(255,255,255,0.7);
    text-align: center;
    transition: var(--transition);
}

.login-header { margin-bottom: 36px; }

.login-logo {
    height: 50px; margin-bottom: 22px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.08));
}

.login-header h2 {
    font-family: var(--font-head);
    color: var(--text-primary);
    font-size: 1.65rem; font-weight: 800;
    letter-spacing: -0.5px;
}
.login-header p {
    color: var(--text-secondary);
    font-size: 0.92rem; margin-top: 8px;
}

.login-form .form-label { text-align: left; }

.btn-login {
    width: 100%; padding: 15px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white; border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-head);
    font-size: 1rem; font-weight: 700;
    cursor: pointer; margin-top: 8px;
    box-shadow: var(--shadow-accent);
    transition: var(--transition);
    letter-spacing: 0.3px;
}
.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(196,0,32,0.38);
    background: linear-gradient(135deg, #d4002a 0%, var(--red-dark) 100%);
}
.btn-login:active { transform: translateY(0); }

.login-footer {
    margin-top: 24px;
    font-size: 0.8rem; color: var(--text-muted);
}
.login-footer a { color: var(--red); text-decoration: none; font-weight: 600; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── Responsive helpers ──────────────────────────────────── */
@media (max-width: 480px) {
    .app-main { padding: 18px 14px 50px; }
    .card, .page-content { padding: 20px; }
    .login-container { padding: 36px 24px; }
    .user-card-banner { padding: 18px 100px 18px 18px; min-height: 80px; }
    .user-avatar-right { width: 72px; height: 72px; right: 14px; }
    .user-avatar-right span { font-size: 1.35rem; }
    .detail-item { padding: 12px 20px; }
}