/* =============================================================
   umbau/css/dashboard.css
   Vamily – Mitglieder-App: Dashboard, Bierdeckel, Spiele-Tracker
   =============================================================
   Inhalt:
     1. Login-Bildschirm
     2. Dashboard: Schnell-Navigation (Action Cards / Kacheln)
     3. Dashboard: Feed (Section-Header, Spiel-Karten)
     4. Dashboard: Kompaktes 2-Spalten-Grid (Legacy)
     5. Bierdeckel: Getränke-Grid & Quick-Action-Buttons
     6. Bierdeckel: Mengen-Anpassung (Adjust-Buttons)
     7. Hobbyspiele-Tracker: Formular & Liste
     8. Spiel-Karten: Match-Highlights (eigene Spiele)
     9. Autocomplete-Suggestions
   ============================================================= */


/* ─────────────────────────────────────────────────────────────
   1. LOGIN-BILDSCHIRM
   Zentrierter Container, der vor dem Login angezeigt wird
   ───────────────────────────────────────────────────────────── */
#app-login-container {
    max-width: 500px;
    margin: 80px auto 0;
    padding: 0 16px;
}

.login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-brand h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-main);
    letter-spacing: -1px;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.login-card h2 {
    border-bottom: none;
    margin-bottom: 8px;
}

.login-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.form-login {
    display: flex;
    flex-direction: column;
    gap: 14px;
}


/* ─────────────────────────────────────────────────────────────
   2. DASHBOARD: SCHNELL-NAVIGATION (Action Cards / Kacheln)
   4-Kacheln-Grid als primäre Navigation im Dashboard
   ───────────────────────────────────────────────────────────── */
.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 24px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow);
}

.action-card:hover {
    border-color: rgba(190, 242, 100, 0.3);
}

.action-card:active {
    transform: scale(0.96);
    background: var(--bg-card-hover);
}

.action-card span {
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Icon-Container innerhalb der Action-Cards */
.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

/* Farbakzente pro Kachel-Typ */
.action-icon.deckel   { color: #38bdf8; }
.action-icon.pyramide { color: var(--primary); }
.action-icon.cm       { color: #f59e0b; }
.action-icon.tracker  { color: #6366f1; }

.action-card:active .action-icon {
    transform: scale(0.9);
}


/* ─────────────────────────────────────────────────────────────
   3. DASHBOARD: FEED
   Feed-Bereiche mit "Alle"-Link und Spielkarten-Listen
   ───────────────────────────────────────────────────────────── */
.dashboard-feed {
    /* Kein Padding – der main-Container übernimmt das */
}

.feed-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0 !important; /* Override .card-section h2 */
    border: none;
}

.btn-text {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.15s;
}

.btn-text:hover {
    opacity: 0.75;
}

/* Spielkarten-Liste (CM, Hobbyspiele, Pyramide) */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* ─────────────────────────────────────────────────────────────
   4. DASHBOARD: KOMPAKTES 2-SPALTEN-GRID (Nächste Spiele)
   Wird für die kompakte Darstellung von Spielterminen genutzt
   ───────────────────────────────────────────────────────────── */
.dashboard-grid.compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Kompakte Spielkarte (linke Farbmarkierung) */
.compact-schedule {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    position: relative;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
}

.type-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
    opacity: 0.6;
}

.match-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.match-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.player.highlight,
.player.winner {
    color: var(--primary);
}

.vs-mini {
    font-size: 0.6rem;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    opacity: 0.4;
}

.match-action-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 6px;
}

/* Status-Text unter Ergebnis-Eingabe (Sieg/Niederlage-Preview) */
.game-status-text {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}


/* ─────────────────────────────────────────────────────────────
   5. BIERDECKEL: GETRÄNKE-GRID & QUICK-ACTION-BUTTONS
   2-Spalten-Grid mit tappbaren Getränke-Buttons
   ───────────────────────────────────────────────────────────── */
.getraenke-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 20px;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    overflow: hidden; /* Badge bleibt im Rahmen */
}

.quick-action-btn:active {
    transform: scale(0.96);
    border-color: var(--primary);
}

.quick-action-btn .btn-name {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-main);
}

.quick-action-btn .btn-preis {
    color: var(--primary);
    font-weight: 800;
    margin-top: 6px;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* Mengen-Abzeichen (zeigt aktuelle Anzahl im Warenkorb) */
.drink-count-badge {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--bg-dark);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.8rem;
    box-shadow: 0 0 15px var(--primary-muted);
    border: 2px solid var(--bg-card);
    z-index: 6;
    pointer-events: none;
}


/* ─────────────────────────────────────────────────────────────
   6. BIERDECKEL: MENGEN-ANPASSUNG (Adjust-Buttons)
   Überlagert den Quick-Action-Button für +/- Steuerung
   ───────────────────────────────────────────────────────────── */
.adjust-btn {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    background: transparent;
    border: none;
    transition: background 0.15s;
    z-index: 5;
    cursor: pointer;
}

.adjust-btn.minus {
    left: 0;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.adjust-btn.plus {
    right: 0;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.adjust-btn:active {
    background: var(--primary-muted);
}


/* ─────────────────────────────────────────────────────────────
   7. HOBBYSPIELE-TRACKER: FORMULAR & LISTE
   Formular-spezifische Styles (Labels, Groups, Autocomplete)
   ───────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Autocomplete-Wrapper */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 50;
    display: none; /* per JS eingeblendet */
}

.autocomplete-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: background 0.1s;
}

.autocomplete-suggestion-item:hover {
    background: var(--bg-card-hover);
}


/* ─────────────────────────────────────────────────────────────
   8. SPIEL-KARTEN: MATCH-HIGHLIGHTS (eigene Spiele)
   Hebt Spiele des eingeloggten Users visuell hervor
   ───────────────────────────────────────────────────────────── */
.is-own-match {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 20px var(--primary-muted) !important;
    position: relative;
}

/* "DEIN SPIEL"-Pill oben rechts */
.is-own-match::after {
    content: 'DEIN SPIEL';
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    pointer-events: none;
}


/* ─────────────────────────────────────────────────────────────
   9. KPI-KARTEN (Kontostand-Übersicht)
   ───────────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.kpi-value.positive { color: var(--primary); }
.kpi-value.negative { color: var(--danger); }
