/* ═══════════════════════════════════════════════════════
   Foodtracker – Custom Styles
   ═══════════════════════════════════════════════════════ */

/* ── Variablen ─────────────────────────────────────────── */
:root {
    --ft-green:       #198754;
    --ft-green-light: #d1e7dd;
    --ft-bg:          #f8faf8;
}

/* ── Allgemein ─────────────────────────────────────────── */
body {
    background-color: var(--ft-bg);
    font-family: system-ui, -apple-system, sans-serif;
}

/* ── Navbar ────────────────────────────────────────────── */
.ft-navbar {
    background: linear-gradient(135deg, #155724 0%, #198754 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 1040;
}

/* ── Login ─────────────────────────────────────────────── */
.ft-login-bg {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    min-height: 100vh;
}

.ft-login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 1.2rem;
    border: none;
}

.ft-login-icon {
    font-size: 3.5rem;
    line-height: 1;
}

/* ── KPI-Karte ─────────────────────────────────────────── */
.ft-kpi-card {
    background: #fff;
    border: 1px solid var(--ft-green-light);
    border-radius: .75rem;
    padding: .6rem 1.2rem;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.ft-kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ft-green);
    line-height: 1.1;
}

.ft-kpi-label {
    font-size: .75rem;
    color: #6c757d;
    font-weight: 500;
}

/* ── Eingabekarte ─────────────────────────────────────── */
.ft-input-card {
    border-top: 3px solid var(--ft-green) !important;
}

/* ── Textarea Placeholder (dezenter Hinweistext) ──────── */
#rawText::placeholder {
    color: #c8c8c8;
    opacity: 1;
}

/* ── Auto-Suggest ─────────────────────────────────────── */
.ft-suggest-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 0 0 .5rem .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.ft-suggest-list .list-group-item {
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .1s;
}

.ft-suggest-list .list-group-item:hover,
.ft-suggest-list .list-group-item.active {
    background: var(--ft-green-light);
    border-left-color: var(--ft-green);
}

.ft-suggest-badge {
    font-size: .7rem;
    padding: .2em .5em;
}

/* ── Chronik-Einträge ─────────────────────────────────── */
.ft-entry-card {
    border-left: 4px solid #dee2e6;
    border-radius: .5rem;
    background: #fff;
    padding: .75rem 1rem;
    margin-bottom: .6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}

.ft-entry-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.ft-entry-card.ft-type-food       { border-left-color: var(--ft-green); }
.ft-entry-card.ft-type-drink      { border-left-color: #0d6efd; }
.ft-entry-card.ft-type-medication { border-left-color: #ffc107; }
.ft-entry-card.ft-type-symptom    { border-left-color: #dc3545; }
.ft-entry-card.ft-type-note       { border-left-color: #0dcaf0; }

.ft-entry-time {
    font-size: .75rem;
    color: #6c757d;
    white-space: nowrap;
}

.ft-entry-type-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.ft-entry-raw {
    font-weight: 500;
}

.ft-entry-items {
    font-size: .8rem;
    color: #6c757d;
    margin-top: .25rem;
}

.ft-entry-cal {
    font-size: .8rem;
    color: var(--ft-green);
    font-weight: 600;
    white-space: nowrap;
}

/* ── Tages-Trennlinie ─────────────────────────────────── */
.ft-day-header {
    font-size: .8rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .25rem .5rem;
    background: #f8faf8;
    border-radius: .4rem;
    margin-bottom: .5rem;
}

/* ── Tages-Summe ──────────────────────────────────────── */
.ft-day-total {
    font-size: .82rem;
    color: var(--ft-green);
    font-weight: 600;
}

/* ── Empty State ──────────────────────────────────────── */
.ft-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #adb5bd;
}

.ft-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: .5rem;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-success {
    background-color: var(--ft-green);
    border-color: var(--ft-green);
}

.btn-outline-success {
    color: var(--ft-green);
    border-color: var(--ft-green);
}

.btn-outline-success:hover {
    background-color: var(--ft-green);
}

/* Quick-Select Buttons */
.ft-date-btn.active,
.ft-time-btn.active {
    background-color: var(--ft-green);
    color: #fff;
    border-color: var(--ft-green);
}

.ft-date-btn:hover,
.ft-time-btn:hover {
    background-color: var(--ft-green-light);
    border-color: var(--ft-green);
}

/* ── Analytics kompakt ────────────────────────────────── */
.ft-analytics-compact .card-header {
    padding: .55rem .8rem;
}

.ft-analytics-compact .card-body {
    padding: .6rem .8rem;
}

.ft-analytics-card {
    min-height: 220px;
}

.ft-analytics-scroll {
    max-height: 190px;
    overflow-y: auto;
}

.ft-analytics-scroll .table {
    margin-bottom: 0;
}

.ft-calendar-wrap {
    min-height: 220px;
}

.ft-calendar-table th {
    text-align: center;
    font-weight: 600;
    font-size: .8rem;
}

.ft-calendar-day {
    vertical-align: top;
    min-width: 130px;
    height: 120px;
    background: #fff;
}

.ft-calendar-day.has-data {
    background: #f6fbf8;
}

.ft-calendar-date {
    font-weight: 700;
    color: #495057;
    margin-bottom: .2rem;
}

.ft-calendar-empty {
    background: #f8f9fa;
}

.ft-trigger-hint {
    min-height: 1rem;
    line-height: 1.1;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
    margin-top: auto;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 576px) {
    .ft-kpi-value { font-size: 1.4rem; }
    #typeGroup .btn { font-size: .7rem; padding: .25rem .5rem; }
    .ft-analytics-card { min-height: 200px; }
    .ft-analytics-scroll { max-height: 160px; }
    .ft-calendar-day { min-width: 105px; height: 110px; }
}
