/* ═══════════════════════════════════════════════════════
   Viva 2026 — Mappatura Candidati
   Design System: cream + navy + terracotta + olive + gold
   Mobile-first, Manrope body, Cormorant Garamond display
   ═══════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: #F7F1E8;
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Color tokens ────────────────────────────────────── */
.bg-cream { background: #F7F1E8; }
.bg-navy { background: #0F2942; }
.bg-white { background: #ffffff; }
.text-navy { color: #0F2942; }
.text-terracotta { color: #B5462E; }
.text-olive { color: #6B8E54; }
.text-gold { color: #B8893A; }
.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }

/* ── Typography ──────────────────────────────────────── */
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }
.font-mono { font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-line { white-space: pre-line; }
.select-all { user-select: all; }
.no-underline { text-decoration: none; }

/* ── Layout ──────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-14 { width: 3.5rem; } .h-14 { height: 3.5rem; }
.w-24 { width: 6rem; } .h-24 { height: 6rem; }
.w-40 { width: 10rem; } .h-40 { height: 10rem; }
.h-16 { height: 4rem; }
.h-14 { height: 3.5rem; }
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-xs { max-width: 20rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.shrink-0 { flex-shrink: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.fixed { position: fixed; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }

/* ── Spacing ─────────────────────────────────────────── */
.p-4 { padding: 1rem; }
.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; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* ── Border & Radius ─────────────────────────────────── */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-b-2 { border-bottom: 2px solid; }
.border-navy { border-color: #0F2942; }

/* ── Opacity ─────────────────────────────────────────── */
.opacity-50 { opacity: 0.5; }

/* ── Card ────────────────────────────────────────────── */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}
.card-hover {
    transition: transform .15s, box-shadow .15s;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ── Form elements ───────────────────────────────────── */
.label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #ffffff;
    color: #1a1a2e;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus {
    outline: none;
    border-color: #0F2942;
    box-shadow: 0 0 0 3px rgba(15,41,66,.12);
}
select.input { cursor: pointer; }
textarea.input { resize: vertical; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none;
    line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: #0F2942;
    color: #ffffff;
}
.btn-primary:hover { background: #1a3d5c; }
.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger {
    background: #B5462E;
    color: #ffffff;
}
.btn-danger:hover { background: #9a3a26; }
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    transition: background .15s;
    text-decoration: none;
}
.btn-icon:hover { background: #e5e7eb; }

/* ── Flash messages ──────────────────────────────────── */
.flash {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.flash-info { background: #e0f2fe; color: #075985; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fef2f2; color: #991b1b; }
.flash-warning { background: #fef9c3; color: #854d0e; }

/* ── Nav ─────────────────────────────────────────────── */
.nav-link {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.nav-link:hover, .nav-link.active {
    color: #ffffff;
    border-bottom-color: #B8893A;
}

/* ── Bottom tab bar ──────────────────────────────────── */
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    min-width: 60px;
    transition: color .15s;
}
.tab-item.active { color: #0F2942; }
.tab-item:hover { color: #0F2942; }

/* ── Table ───────────────────────────────────────────── */
table { border-collapse: collapse; }
code {
    font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
    font-size: 0.8125rem;
}

/* ── Background variants ─────────────────────────────── */
.bg-gray-100 { background: #f3f4f6; }
.bg-gray-200 { background: #e5e7eb; }

/* ── Object fit ──────────────────────────────────────── */
.object-cover { object-fit: cover; }

/* ── Responsive ──────────────────────────────────────── */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:inline { display: inline; }
    .md\:w-64 { width: 16rem; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Transition helpers ──────────────────────────────── */
.transition-colors { transition: color .15s, background-color .15s; }
.transition-all { transition: all .2s; }
a { color: inherit; }
a:hover { color: #0F2942; }

/* ── Star button ─────────────────────────────────────── */
.star-btn { background: none; border: none; cursor: pointer; padding: 2px; }
