/* ================================================================
   Přehled (personal overview) — built from the same pieces as the rest of the app:
   grey panels with white cards, blue figures like the login statistics, priority colours.
   ================================================================ */
.is-overview .content-controls {
    display: none;
}

#overview-view {
    gap: 1.875rem;
}

.ov-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ov-subtitle {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
}

.ov-year {
    position: relative;
}

.ov-year .icon-box {
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 8rem;
}

.ov-year .dropdown-panel {
    left: auto;
    right: 0;
}

/* ---------- Headline figures ---------- */
.ov-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.ov-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
}

.ov-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.5rem;
    background: var(--color-background);
    border-radius: var(--border-radius);
}

.ov-card-value {
    font-size: 2.75rem;
    line-height: 1.1;
    color: var(--color-primary);
}

.ov-card-value small {
    font-size: var(--font-size-base);
    font-weight: normal;
    color: var(--color-gray-dark);
}

.ov-card.is-alert .ov-card-value {
    color: var(--color-red);
}

.ov-card-note {
    font-size: var(--font-size-sm);
}

.ov-track {
    width: 100%;
    height: 0.6rem;
    margin-top: 0.5rem;
    overflow: hidden;
    background: var(--color-background);
    border-radius: 999px;
}

.ov-track i {
    display: block;
    height: 100%;
    background: var(--color-primary);
    border-radius: 999px;
}

/* ---------- Panels ---------- */
.ov-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.875rem;
}

.ov-grid--wide {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.ov-grid--wide .ov-panel:only-child {
    grid-column: 1 / -1;
}

.ov-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    min-width: 0;
    padding: var(--spacing-md);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.ov-panel h3 {
    margin: 0 0 var(--spacing-xs);
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--color-secondary);
}

.ov-subhead {
    margin: var(--spacing-xs) 0 0;
    font-size: var(--font-size-xs);
    font-weight: normal;
    text-transform: uppercase;
    color: var(--color-gray-dark);
}

.ov-subhead.is-alert {
    color: var(--color-red);
}

/* Progress by priority */
.ov-bar {
    display: grid;
    grid-template-columns: clamp(7rem, 12vw, 10rem) 1fr 4.5rem;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
}

.ov-bar span:last-child {
    text-align: right;
}

.ov-panel .ov-track {
    margin-top: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
}

.ov-track--priority i.zavazne { background: var(--color-zavazne); }
.ov-track--priority i.zavazne-doporucene { background: var(--color-zavazne-doporucene); }
.ov-track--priority i.doporucene { background: var(--color-doporucene); }
.ov-track--priority i.informativni { background: var(--color-informativni); }
.ov-track--priority i.vlastni { background: var(--color-vlastni); }

/* Tasks per month */
.ov-months {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    height: 11rem;
}

.ov-month {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.ov-month-count,
.ov-month-label {
    font-size: var(--font-size-xs);
    line-height: 1;
    color: var(--color-gray-dark);
}

.ov-month-count {
    min-height: 0.75rem;
}

.ov-month-bar {
    display: flex;
    flex: 1;
    align-items: flex-end;
    width: 100%;
}

.ov-month-total {
    display: flex;
    align-items: flex-end;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 0.25rem;
}

.ov-month-total i {
    display: block;
    width: 100%;
    background: var(--color-primary);
}

.ov-month.is-current .ov-month-total {
    border-color: var(--color-primary);
}

.ov-month.is-current .ov-month-label {
    font-weight: bold;
    color: var(--color-primary);
}

.ov-legend {
    display: flex;
    gap: 1rem;
    font-size: var(--font-size-xs);
    color: var(--color-gray-dark);
}

.ov-legend span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ov-legend i {
    display: block;
    width: 0.625rem;
    height: 0.625rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 0.125rem;
}

.ov-legend i.done {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* ---------- Attention list and comparison ---------- */
.ov-task {
    cursor: pointer;
}

/* The drag handle has no meaning here; the checkbox stays so a task can be ticked off directly */
.ov-task .task-footer img {
    display: none;
}

.ov-task .task-details span:last-child.ov-overdue {
    font-weight: bold;
    color: var(--color-red);
}

.ov-more,
.ov-empty {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
}

.ov-compare {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
}

.ov-compare:last-child {
    border-bottom: 0;
}

.ov-compare strong {
    font-weight: normal;
    color: var(--color-secondary);
    text-align: right;
}

/* ---------- Not signed in / nothing to show ---------- */
.ov-locked {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--color-background);
    border: 1px dashed var(--color-border);
    border-radius: var(--border-radius);
}

.ov-locked p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--color-secondary);
}

.ov-button {
    display: inline-flex;
    align-items: center;
    height: 2.5rem;
    padding: 0 1.125rem;
    font-size: var(--font-size-sm);
    font-weight: bold;
    color: var(--color-on-primary);
    text-decoration: none;
    background: var(--color-primary);
    border-radius: 0.375rem;
}

/* ---------- Narrower windows ---------- */
@media (max-width: 75rem) {
    .ov-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 56.25rem) {
    .ov-grid,
    .ov-grid--wide {
        grid-template-columns: minmax(0, 1fr);
    }
}
