/* ---------------------------------------------------------
   damage.css — Damage Board (Nayax-Stil)
   Klassen mit db- präfixiert.
--------------------------------------------------------- */

/* ── Page header ──────────────────────────────────────── */
.db-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.db-head h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    border-left: 3px solid var(--danger);
    padding-left: 12px;
    line-height: 1.2;
    margin: 0;
}
.db-head p {
    font-size: 13px;
    color: var(--text-soft);
    margin: 3px 0 0;
    padding-left: 15px;
}

/* ── Tab bar ──────────────────────────────────────────── */
.db-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px;
    margin-bottom: 14px;
}
.db-tab {
    padding: 7px 14px;
    border-radius: calc(var(--radius) - 2px);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-soft);
    transition: background .12s, color .12s;
}
.db-tab:hover { background: var(--surface); color: var(--text); }
.db-tab--active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ── Filters ──────────────────────────────────────────── */
.db-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.db-filter select {
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    padding: 0 10px;
    font: inherit;
    font-size: 13.5px;
    background: var(--bg);
    color: var(--text);
    outline: none;
}
.db-filter select:focus { border-color: var(--brand); }
.db-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s;
}
.db-filter-btn--ghost {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-soft);
}
.db-filter-btn--ghost:hover { background: var(--bg-soft); color: var(--text); }

/* ── Section title ────────────────────────────────────── */
.db-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.db-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-mute);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 800;
}
.db-section-wrap { margin-bottom: 28px; }

/* ── Card grid ────────────────────────────────────────── */
.db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

/* ── Card ─────────────────────────────────────────────── */
.db-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .12s;
}
.db-card:hover { box-shadow: var(--shadow-md); }
.db-card--done { opacity: .6; }

.db-card__header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px 0;
    flex-wrap: wrap;
}
.db-card__emoji {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.db-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}
.db-card__body {
    padding: 10px 14px 14px;
    flex: 1;
}
.db-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 5px;
    line-height: 1.3;
}
.db-card__meta {
    font-size: 11.5px;
    color: var(--text-mute);
    margin-bottom: 6px;
    line-height: 1.5;
}
.db-card__desc {
    font-size: 13px;
    color: var(--text-soft);
    margin: 6px 0 0;
    white-space: pre-line;
    line-height: 1.55;
}
.db-card__footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-soft);
}

/* ── Badges ───────────────────────────────────────────── */
.db-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}
.db-badge--danger {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}
.db-badge--done {
    background: #ECFDF5;
    color: #16A34A;
    border: 1px solid #86EFAC;
}

/* ── Action button (in footer) ────────────────────────── */
.db-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: var(--radius);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s;
}
.db-btn--primary { background: var(--ok); color: #fff; }
.db-btn--primary:hover { background: var(--ok-deep); }

/* ── Photo grid (inside card) ─────────────────────────── */
.db-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}
.db-photo-grid a { display: block; }
.db-photo-grid img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.db-photo-more {
    width: 72px;
    height: 72px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-mute);
}

/* ── Room photo list ──────────────────────────────────── */
.db-photo-list { display: flex; flex-direction: column; gap: 10px; }
.db-photo-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}
.db-photo-row__meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}
.db-photo-row__meta strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.db-photo-row__meta span {
    font-size: 12px;
    color: var(--text-mute);
}
.db-photo-row__none {
    font-size: 13px;
    color: var(--text-mute);
}

/* ── Empty state ──────────────────────────────────────── */
.db-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-mute);
}
.db-empty i { font-size: 32px; color: var(--border-strong); }
.db-empty p { margin: 0; font-size: 14px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 700px) {
    .db-grid { grid-template-columns: 1fr; }
}
