@import url('https://fonts.googleapis.com/css2?family=Recursive:wght@600;900&display=swap');

/* Electus — Custom styles over UIkit */

:root {
    --e-primary:    #2f6ad9;
    --e-accent:     #60a5fa;
    --e-bg:         #f5f8ff;
    --e-text:       #0f172a;
    --e-sidebar-w:  240px;
    --e-navbar-h:   60px;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.e-navbar {
    background: var(--e-primary);
    height: var(--e-navbar-h);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.e-navbar .uk-navbar-nav > li > a,
.e-navbar .uk-navbar-item {
    color: rgba(255,255,255,.85);
    font-size: .875rem;
}

.e-navbar .uk-navbar-nav > li > a:hover {
    color: #fff;
}

/* ── Logo ───────────────────────────────────────────────────────────────────── */
.e-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.e-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    color: var(--e-primary);
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -.5px;
}

.e-wordmark {
    font-family: 'Recursive', cursive;
    font-weight: 900;
}

.e-logo-text {
    color: #fff;
    font-family: 'Recursive', cursive;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: .3px;
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.e-sidebar {
    width: var(--e-sidebar-w);
    min-height: calc(100vh - var(--e-navbar-h));
    background: #fff;
    border-right: 1px solid #e8e6f0;
    padding: 20px 0;
    flex-shrink: 0;
}

.e-nav {
    padding: 0 12px;
}

.e-nav .uk-nav-header {
    color: #9a94b8;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 16px 12px 4px;
}

.e-nav > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #4a4568;
    font-size: .875rem;
    transition: background .15s, color .15s;
}

.e-nav > li > a:hover,
.e-nav > li.uk-active > a {
    background: var(--e-bg);
    color: var(--e-primary);
}

.e-nav > li.uk-active > a {
    font-weight: 600;
}

.e-nav .uk-nav-sub-item > a {
    padding-left: 36px;
    font-size: .825rem;
}

/* ── Content area ───────────────────────────────────────────────────────────── */
.e-content {
    background: var(--e-bg);
    min-height: calc(100vh - var(--e-navbar-h));
    padding: 32px 36px;
}

.e-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--e-text);
    margin-bottom: 24px;
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.e-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(76,61,158,.06);
    border: 1px solid #ece9f5;
}

/* ── Stat cards ─────────────────────────────────────────────────────────────── */
.e-stat {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid #ece9f5;
    box-shadow: 0 1px 4px rgba(76,61,158,.06);
}

.e-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--e-primary);
    line-height: 1;
}

.e-stat-label {
    font-size: .8rem;
    color: #9a94b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.e-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ece9f5;
    box-shadow: 0 1px 4px rgba(76,61,158,.06);
}

.e-table .uk-table th {
    background: var(--e-bg);
    color: #6b6494;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    border-bottom: 1px solid #ece9f5;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.uk-button-primary {
    background-color: var(--e-primary);
    border-color: var(--e-primary);
}

.uk-button-primary:hover,
.uk-button-primary:focus {
    background-color: #3d3080;
    border-color: #3d3080;
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.e-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.e-badge-draft    { background: #f0eeff; color: #6b52d4; }
.e-badge-active   { background: #e6f9ee; color: #1a7a3c; }
.e-badge-closed   { background: #f5f5f5; color: #777;    }
.e-badge-archived { background: #fdf2e3; color: #a06000; }

/* ── Public vote interface ──────────────────────────────────────────────────── */
.e-public-body {
    background: #fff;
    color: var(--e-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.e-public-header {
    background: var(--e-primary);
    padding: 0 0;
}

.e-public-header .uk-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.e-public-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.e-lang-switcher {
    display: flex;
    gap: 8px;
}

.e-lang-switcher a {
    color: rgba(255,255,255,.65);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
}

.e-lang-switcher a:hover,
.e-lang-switcher a.e-lang-active {
    color: #fff;
    background: rgba(255,255,255,.15);
}

.e-public-main {
    flex: 1;
    padding: 40px 0 60px;
}

.e-vote-box {
    border: 1px solid #ece9f5;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
}

.e-vote-category {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--e-accent);
    margin-bottom: 8px;
}

.e-public-footer {
    background: var(--e-bg);
    border-top: 1px solid #ece9f5;
    padding: 16px 0;
    text-align: center;
    font-size: .8rem;
    color: #9a94b8;
}

.e-public-footer a {
    color: var(--e-primary);
}

/* ── Sidebar — event context ────────────────────────────────────────────────── */

/* Divider between global nav and event context */
.e-nav-event-title {
    margin-top: 12px;
    padding: 6px 12px 2px;
    border-top: 1px solid #ece9f5;
}

.e-nav .e-nav-event-title > a {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--e-primary);
    line-height: 1.4;
    white-space: normal;
    text-decoration: none;
    padding: 6px 12px 4px;
}

.e-nav .e-nav-event-title > a:hover {
    text-decoration: underline;
    background: transparent;
}

/* Round accordion toggle — higher specificity to override level-1 sub-item rule */
.e-nav .uk-nav-sub > li.e-nav-round-item > a {
    padding: 6px 12px;
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.e-nav-round-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.e-nav-round-label {
    flex: 1;
    font-weight: 600;
    color: #4a4568;
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.3;
}

.e-nav-round-sub {
    font-weight: 400;
    font-size: .74rem;
    color: #9a94b8;
}

/* Sub-items inside round accordion */
/* CSS controls initial visibility so items are never hidden before UIkit JS initializes */
.e-nav .uk-nav-sub {
    padding: 0 0 4px 0;
    display: none;
}

.e-nav li.uk-open > .uk-nav-sub {
    display: block;
}

/* Level 1: overview, categories, voters (and round toggles — overridden below) */
.e-nav .uk-nav-sub > li > a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 14px;
    font-size: .8rem;
    color: #6b6494;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

/* Level 2: candidates, results (inside round sub-menu) */
.e-nav .uk-nav-sub .uk-nav-sub > li > a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 30px;
}

.e-nav .uk-nav-sub > li > a:hover,
.e-nav .uk-nav-sub > li.uk-active > a,
.e-nav .uk-nav-sub .uk-nav-sub > li > a:hover,
.e-nav .uk-nav-sub .uk-nav-sub > li.uk-active > a {
    background: var(--e-bg);
    color: var(--e-primary);
}

.e-nav .uk-nav-sub > li.uk-active > a,
.e-nav .uk-nav-sub .uk-nav-sub > li.uk-active > a {
    font-weight: 600;
}

/* ── Dedup score colours ────────────────────────────────────────────────────── */
.e-score-high   { color: #e74c3c; font-weight: 800; }
.e-score-medium { color: #f39c12; font-weight: 800; }
.e-score-low    { color: #9a94b8; font-weight: 800; }

/* ── Vote options (single/multiple/proportional/weighted) ──────────────────── */
.e-vote-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #ece9f5;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: .95rem;
}

.e-vote-option:hover {
    border-color: var(--e-accent);
    background: #f8f7ff;
}

.e-vote-option input[type="radio"],
.e-vote-option input[type="checkbox"] {
    accent-color: var(--e-primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.e-vote-option:has(input:checked) {
    border-color: var(--e-primary);
    background: #f0eeff;
}

/* ── Pipeline editor ────────────────────────────────────────────────────────── */
.e-pipeline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.e-pipeline-block {
    padding: 16px 20px;
    position: relative;
}

.e-pipeline-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--e-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.e-pipeline-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f5f3ff;
}

.e-pipeline-cat {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--e-bg);
    border: 1px solid #ece9f5;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: .78rem;
}

.e-pipeline-cat-name {
    font-weight: 600;
    color: var(--e-text);
}

.e-pipeline-cat-adv {
    font-size: .7rem;
    padding: 1px 6px;
    border-radius: 10px;
}

.e-pipeline-adv-auto   { background: #e6f9ee; color: #1a7a3c; }
.e-pipeline-adv-all    { background: #e6f9ee; color: #1a7a3c; }
.e-pipeline-adv-none   { background: #f5f5f5; color: #999; }
.e-pipeline-adv-manual { background: #f0eeff; color: #6b52d4; }

/* Arrow connector between phases */
.e-pipeline-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0;
    gap: 0;
    color: #c8c3e0;
    font-size: .72rem;
    font-weight: 600;
}

.e-pipeline-arrow-line {
    width: 2px;
    height: 20px;
    background: #ece9f5;
}

.e-pipeline-arrow-head {
    font-size: .8rem;
    color: #c8c3e0;
    line-height: 1;
    margin-top: -2px;
}

/* ── Pipeline bridge (promozione tra turni) ──────────────────────────────── */
.e-pipeline-bridge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.e-pipeline-bridge-line {
    width: 2px;
    height: 14px;
    background: #ece9f5;
}

.e-pipeline-bridge-card {
    background: #f8f7fc;
    border: 1px solid #e8e6f0;
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 200px;
    max-width: 360px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.e-pipeline-bridge-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.e-pipeline-bridge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ede9f7;
    color: #4a3a8c;
    border-radius: 99px;
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
}

.e-pipeline-bridge-mode {
    background: #4a3a8c;
    color: #fff;
    border-radius: 99px;
    padding: 1px 7px;
    font-size: .65rem;
    font-weight: 600;
}

.e-pipeline-bridge-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Add phase button area */
.e-pipeline-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0 4px;
    gap: 8px;
}

.e-pipeline-add::before {
    content: '';
    display: block;
    width: 2px;
    height: 20px;
    background: #ece9f5;
}

/* ── Public link strip ──────────────────────────────────────────────────────── */
.e-publink-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f8f7ff;
    border: 1px solid #ece9f5;
    font-size: .82rem;
    min-width: 0;
}

.e-publink-live {
    background: #f0fdf4;
    border-color: #b7efd0;
}

.e-publink-url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8rem;
    color: var(--e-primary);
}

.e-publink-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a7a3c;
    flex-shrink: 0;
    animation: e-pulse 1.4s ease-in-out infinite;
}

@keyframes e-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

/* ── Lifecycle stepper (dot-based) ─────────────────────────────────────────── */
.e-stepper {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.e-stepper-sep {
    width: 14px;
    height: 2px;
    background: #e8e6f0;
    border-radius: 1px;
    flex-shrink: 0;
}

.e-stepper-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.e-step-done    { background: #27ae60; }
.e-step-current { background: var(--e-primary); box-shadow: 0 0 0 3px rgba(76,61,158,.18); }
.e-step-future  { background: #e0ddf0; }
.e-step-pending { background: #e67e22; box-shadow: 0 0 0 3px rgba(230,126,34,.2); }

.e-stepper-label {
    position: absolute;
    right: calc(100% + 6px);
    white-space: nowrap;
    font-size: .68rem;
    font-weight: 700;
    color: var(--e-primary);
    background: #f0eeff;
    padding: 1px 7px;
    border-radius: 10px;
    pointer-events: none;
}

.e-stepper-label-pending {
    color: #a05800;
    background: #fdf2e3;
}

/* ── Category grid (compact, dot = advancement mode) ────────────────────────── */
.e-cats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f5f3ff;
}

.e-cat-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--e-bg);
    border: 1px solid #ece9f5;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .72rem;
    min-width: 0;
    cursor: default;
}

.e-cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.e-cat-chip-name {
    font-weight: 600;
    color: var(--e-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* ⋯ popover trigger button */
.e-cat-pop-btn {
    background: none;
    border: none;
    padding: 0 2px;
    cursor: pointer;
    font-size: .85rem;
    color: #c8c3e0;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s, background .15s;
}

.e-cat-pop-btn:hover {
    color: var(--e-primary);
    background: var(--e-bg);
}

/* Popover balloon */
.e-cat-popover {
    min-width: 240px;
    max-width: 280px;
    z-index: 1050;
}

.e-cat-pop-inner {
    background: #fff;
    border: 1px solid #ece9f5;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(76,61,158,.13);
}

.e-cat-pop-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--e-text);
    margin-bottom: 4px;
}

.e-cat-pop-desc {
    font-size: .75rem;
    color: #9a94b8;
    line-height: 1.4;
}

/* ── Round action bar ───────────────────────────────────────────────────────── */
.e-round-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #ece9f5;
}

.e-btn-danger {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.e-btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

/* ── Round delete button (absolute bottom-right of card) ────────────────────── */
.e-round-delete {
    position: absolute;
    bottom: 14px;
    right: 16px;
    margin: 0;
}

.e-round-delete-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #c8c3e0;
    line-height: 1;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.e-round-delete-btn:hover {
    color: #e74c3c;
    background: #fde8e8;
}

/* ── Borda point rows ───────────────────────────────────────────────────────── */
.e-borda-row {
    padding: 10px 0;
    border-bottom: 1px solid #f0eeff;
    gap: 12px;
}

.e-borda-row:last-child {
    border-bottom: none;
}

/* ── Theme picker ───────────────────────────────────────────────────────────── */
.e-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}

.e-theme-card {
    position: relative;
    border: 2px solid #ece9f5;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}

.e-theme-card:hover {
    border-color: var(--e-primary);
    box-shadow: 0 2px 8px rgba(79,70,229,.12);
}

.e-theme-selected {
    border-color: var(--e-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.18);
}

.e-theme-preview {
    height: 68px;
    overflow: hidden;
}

.e-theme-preview-bar {
    height: 16px;
    display: flex;
    align-items: center;
}

.e-theme-label {
    padding: 6px 8px;
    font-size: .72rem;
    font-weight: 600;
    color: #3d3557;
    line-height: 1.3;
}

.e-theme-swatches {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.e-theme-swatches span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ── Public page content ─────────────────────────────────────────────────── */

.e-public-logo-event {
    text-align: center;
    margin-bottom: 24px;
}
.e-public-logo-event img {
    max-height: 100px;
    max-width: 260px;
    object-fit: contain;
}

.e-public-description {
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--e-text);
}
.e-public-description p:last-child {
    margin-bottom: 0;
}

.e-public-infobox {
    margin-bottom: 20px;
}

.e-public-deadline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    color: var(--e-accent);
    margin-bottom: 16px;
}

.e-public-instructions {
    margin-bottom: 20px;
}

.e-gdpr-notice {
    font-size: .8rem;
    color: var(--e-text-muted, #9a94b8);
    margin-top: 12px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Event landing hero ─────────────────────────────────────────────────── */
.e-event-hero {
    text-align: center;
    margin-bottom: 32px;
}

.e-event-hero-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--e-primary);
    color: #fff;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.e-event-hero-logo {
    max-height: 120px;
    max-width: 280px;
    object-fit: contain;
    margin-bottom: 16px;
}

.e-event-hero-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--e-text);
    margin: 0 0 6px;
    line-height: 1.25;
}

.e-event-hero-round {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--e-primary);
    background: var(--e-bg);
    border-radius: 20px;
    padding: 4px 14px;
    margin-top: 4px;
}

.e-event-hero-desc {
    max-width: 460px;
    margin: 16px auto 0;
    text-align: left;
}

.e-vote-box-form {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 6px 24px rgba(15,23,42,.06);
}

.e-vote-box-form .uk-input {
    border-radius: 8px;
}

.e-vote-box-form label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--e-text);
    margin-bottom: 6px;
}

.e-vote-box-hint {
    color: var(--e-text-muted, #9a94b8);
    font-size: .875rem;
    margin-bottom: 16px;
}

/* Vote step indicator */
.e-vote-steps {
    display: flex;
    margin-bottom: 28px;
    font-size: .78rem;
    gap: 0;
}
.e-vote-step {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    color: var(--e-text-muted, #9a94b8);
    border-bottom: 2px solid #ece9f5;
}
.e-vote-step.active {
    color: var(--e-primary);
    font-weight: 700;
    border-bottom-color: var(--e-primary);
}
.e-vote-step.done {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

/* ── Public results page ────────────────────────────────────────────────── */
.e-results-hero {
    background: linear-gradient(135deg, var(--e-primary), rgba(0,0,0,.28)), var(--e-primary);
    padding: 36px 0 30px;
    color: #fff;
}

.e-results-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.e-results-hero-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    overflow: hidden;
}

.e-results-hero-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.e-results-hero-logo .e-logo-mark {
    background: transparent;
    font-size: 1.6rem;
}

.e-results-hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    margin-bottom: 4px;
}

.e-results-hero-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.e-results-hero-meta {
    margin-top: 6px;
    font-size: .875rem;
    color: rgba(255,255,255,.85);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.e-results-hero-meta .e-badge {
    background: rgba(255,255,255,.18);
    color: #fff;
}

/* Round tabs */
.e-round-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}

.e-round-tabs a {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--e-text);
    background: #fff;
    border: 1px solid #ece9f5;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}

.e-round-tabs a:hover {
    border-color: var(--e-primary);
    color: var(--e-primary);
}

.e-round-tabs a.e-round-tab-active {
    background: var(--e-primary);
    border-color: var(--e-primary);
    color: #fff;
}

/* Category result card */
.e-results-card {
    background: #fff;
    border: 1px solid #ece9f5;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(76,61,158,.06);
}

.e-results-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--e-text);
    margin: 0 0 20px;
}

/* Podium */
.e-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    max-width: 560px;
    margin: 0 auto 28px;
}

.e-podium-item {
    flex: 1 1 0;
    max-width: 170px;
    text-align: center;
}

.e-podium-item:nth-child(1) { order: 2; }
.e-podium-item:nth-child(2) { order: 1; }
.e-podium-item:nth-child(3) { order: 3; }

.e-podium-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    margin: 0 auto 8px;
}

.e-podium-item:nth-child(1) .e-podium-avatar { background: linear-gradient(135deg,#f5cc4e,#d4a017); width: 60px; height: 60px; font-size: 1.3rem; }
.e-podium-item:nth-child(2) .e-podium-avatar { background: linear-gradient(135deg,#cfd5dd,#9aa2ad); }
.e-podium-item:nth-child(3) .e-podium-avatar { background: linear-gradient(135deg,#e0aa77,#b9743f); }

.e-podium-name {
    font-size: .85rem;
    font-weight: 700;
    color: var(--e-text);
    margin-bottom: 2px;
    overflow-wrap: break-word;
}

.e-podium-points {
    font-size: .78rem;
    color: #9a94b8;
    margin-bottom: 8px;
}

.e-podium-step {
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: rgba(0,0,0,.35);
}

.e-podium-item:nth-child(1) .e-podium-step { height: 96px; background: linear-gradient(180deg,#fdf1cf,#f7e2a3); }
.e-podium-item:nth-child(2) .e-podium-step { height: 72px; background: linear-gradient(180deg,#f1f2f4,#e2e5ea); }
.e-podium-item:nth-child(3) .e-podium-step { height: 54px; background: linear-gradient(180deg,#f7e6d7,#efd2b8); }

/* Winner / promoted badge */
.e-badge-winner,
.e-badge-promoted {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.e-badge-winner    { background: #fdf1cf; color: #8a6d1a; }
.e-badge-promoted  { background: #e6f9ee; color: #1a7a3c; }

.e-results-table-wrap {
    overflow-x: auto;
}

.e-results-table-wrap table th,
.e-results-table-wrap table td {
    white-space: nowrap;
}

.e-results-rank-1 { background: #fdf9ee; }

/* "Not available" gate page */
.e-results-gate {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 56px 24px;
}

.e-results-gate-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--e-bg);
    color: var(--e-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

@media (max-width: 640px) {
    .e-results-hero-title { font-size: 1.35rem; }
    .e-podium { gap: 8px; }
    .e-podium-avatar { width: 42px; height: 42px; font-size: 1rem; }
    .e-podium-item:nth-child(1) .e-podium-avatar { width: 50px; height: 50px; }
    .e-results-card { padding: 18px; }
}

/* Quill editor in admin */
.e-quill-editor {
    background: #fff;
}
.ql-toolbar {
    border-radius: 6px 6px 0 0;
    border-color: #e8e4f0 !important;
}
.ql-container {
    border-radius: 0 0 6px 6px;
    font-size: .9rem;
    border-color: #e8e4f0 !important;
    height: auto !important;
}
.ql-editor {
    min-height: 120px;
}

/* ── Footer comune ───────────────────────────────────────────────────────── */
.e-footer {
    border-top: 1px solid rgba(47,106,217,.12);
    padding: 18px 24px;
    text-align: center;
    background: transparent;
}

.e-footer-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.e-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.e-footer-logo-mark {
    width: 22px;
    height: 22px;
    background: var(--e-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.e-footer-logo-mark img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.e-footer-logo-name {
    font-family: 'Recursive', cursive;
    font-weight: 900;
    font-size: .8rem;
    color: var(--e-primary);
    letter-spacing: .01em;
}

.e-footer-copy {
    font-size: .78rem;
    color: #8a9ab8;
    margin: 0;
    white-space: nowrap;
}

.e-footer-divider {
    color: #c8d0e0;
    font-size: .78rem;
}

.e-footer-brand {
    font-family: 'Recursive', cursive;
    font-weight: 600;
    color: var(--e-primary);
}
