*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f0f2f7;
    color: #1a1f36;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Hlavička ── */
.site-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6cdf 100%);
    color: #fff;
    padding: 2rem 0 2.2rem;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.school-badge {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.header-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
    line-height: 1.2;
}

.header-text p {
    margin: 0;
    opacity: 0.75;
    font-size: 0.9rem;
}

/* ── Info box ── */
.info-box {
    background: #e8f1ff;
    border: 1px solid #c5d8ff;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #1a3a6e;
    font-size: 0.95rem;
}

.info-icon {
    font-size: 1.5rem;
    color: #2d6cdf;
}

/* ── Hlavní karta hlasování ── */
.vote-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(30, 58, 95, 0.1);
    overflow: hidden;
}

.vote-card-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6cdf 100%);
    color: #fff;
    padding: 1.5rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-card-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
}

.company-count {
    text-align: center;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    min-width: 64px;
}

.company-count span {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.company-count small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.vote-card-body {
    padding: 1.5rem 1.75rem 1.75rem;
}

/* ── Popisky nejlepší / nejhorší ── */
.rank-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.rank-label-top {
    font-size: 0.8rem;
    font-weight: 600;
    color: #22a06b;
}

.rank-label-bottom {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e5484d;
}

/* ── Sortable seznam ── */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8f9fc;
    border: 1.5px solid #e4e7f0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 8px;
    cursor: grab;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    user-select: none;
}

.sortable-item:hover {
    background: #eef2ff;
    border-color: #a8bef8;
}

.sortable-item:active { cursor: grabbing; }

.sortable-ghost {
    opacity: 0.35;
    background: #dde8ff !important;
    border-color: #93b4ff !important;
}

.sortable-chosen {
    background: #eef2ff !important;
    border-color: #5b8def !important;
    box-shadow: 0 6px 20px rgba(45, 108, 223, 0.18);
    transform: scale(1.01);
}

.sortable-drag {
    box-shadow: 0 12px 32px rgba(30, 58, 95, 0.18);
}

.drag-handle {
    font-size: 1.25rem;
    color: #b0b8d0;
    cursor: grab;
    flex-shrink: 0;
}

.rank-num {
    min-width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2d6cdf;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.rank-num.rank-first { background: #22a06b; }
.rank-num.rank-last  { background: #e5484d; }

.company-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1f36;
}

/* ── Tlačítko odeslat ── */
.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #1e3a5f, #2d6cdf);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(45, 108, 223, 0.35);
}

.submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(45, 108, 223, 0.45);
}

.submit-btn:active { transform: translateY(0); }

/* ── Stav karty (hlasoval / nezačalo) ── */
.state-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(30, 58, 95, 0.1);
    padding: 3rem 2rem;
    text-align: center;
}

.state-icon {
    font-size: 4rem;
    line-height: 1;
}

.state-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.divider { border-top: 1px solid #e4e7f0; }

/* ── Patička ── */
.site-footer {
    margin-top: auto;
    padding: 1.25rem 0;
    background: #fff;
    border-top: 1px solid #e4e7f0;
    font-size: 0.82rem;
    color: #8892a4;
}

/* ── Bootstrap karty v admin panelu ── */
.card { border-radius: 12px; }
.card-header { border-radius: 12px 12px 0 0 !important; }

/* ── Responzivita ── */
@media (max-width: 576px) {
    .header-inner { flex-direction: column; text-align: center; }
    .header-text h1 { font-size: 1.25rem; }
    .vote-card-header { flex-direction: column; gap: 0.75rem; text-align: center; }
    .vote-card-body { padding: 1.25rem; }
}
