/* ── User-Karten ─────────────────────────────────── */
.user-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

.user-card {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.user-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 134, 198, 0.15);
}

.user-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary); /* Fallback; wird per JS überschrieben */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    flex-shrink: 0;
}

.user-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.user-card-name {
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-weight {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
}

.user-card-date {
    font-size: 0.73rem;
    color: var(--color-text-muted);
}

/* ── Diagramm-Bereich ────────────────────────────── */
.chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.chart-header h2 { margin-bottom: 0; }

.chart-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.83rem;
    color: var(--color-text-muted);
}

.chart-controls label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.chart-controls input[type="date"] {
    width: auto;
    padding: 0.3rem 0.55rem;
    font-size: 0.83rem;
}

.chart-wrapper {
    height: 320px;
    position: relative;
}

/* ── Statistik-Leiste ────────────────────────────── */
.chart-stats {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.88rem;
}

.stat-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-name    { flex: 1; font-weight: 500; }
.stat-current { color: var(--color-text-muted); min-width: 60px; text-align: right; }
.stat-change  { font-weight: 600; min-width: 120px; text-align: right; }

/* ── Gewicht eintragen ───────────────────────────── */
.add-weight h2 { margin-bottom: 1rem; }

/* ── Gewichtstabelle ─────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    white-space: nowrap;
}

.data-table thead th {
    padding: 0.55rem 1rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
    background: var(--color-surface);
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--color-surface-2);
}

/* Neue Tagesgruppe: obere Trennlinie stärker */
.data-table tbody tr.day-start td {
    border-top: 2px solid var(--color-border);
}

.data-table td {
    padding: 0.5rem 1rem;
    vertical-align: middle;
}

.data-table .col-date {
    color: var(--color-text-muted);
    font-size: 0.83rem;
}

.data-table .col-weight {
    font-weight: 600;
    color: var(--color-primary);
}

.data-table .col-empty {
    color: var(--color-border);
    text-align: center;
}
