/* Surft Beach Cashflow — minimaler, klarer Stil */

:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1a2233;
    --text-muted: #5a6b7c;
    --primary: #0a7ea4;
    --primary-hover: #086380;
    --green: #2eb872;
    --yellow: #e8a635;
    --red: #d24a4a;
    --border: #e1e6ec;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    font-size: 14px;
}

.screen { min-height: 100vh; }
.hidden { display: none !important; }

/* ---- Login ---- */
#login {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0a7ea4 0%, #1ca7ce 100%);
}
.login-card {
    background: white; padding: 36px 32px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 360px; max-width: 90vw;
}
.login-card h1 { font-size: 22px; margin-bottom: 24px; text-align: center; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card label { display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted); gap: 4px; }
.login-card input { padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.login-card button { padding: 12px; background: var(--primary); color: white; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.login-card button:hover { background: var(--primary-hover); }
.error { color: var(--red); font-size: 12px; margin-top: 8px; }

/* ---- Topbar ---- */
.topbar {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 0 24px; display: flex; align-items: center; gap: 24px;
    position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 16px; padding: 14px 0; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.tabs button {
    background: none; border: none; padding: 14px 12px; font-size: 13px;
    color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs button:hover:not(.active) { color: var(--text); }
.user { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.user button {
    padding: 6px 12px; font-size: 12px; background: white;
    border: 1px solid var(--border); border-radius: 4px; cursor: pointer;
}

/* ---- Main ---- */
main { padding: 24px; max-width: 1400px; margin: 0 auto; }
section { margin-bottom: 32px; }
h2 { font-size: 18px; margin-bottom: 16px; font-weight: 600; }
h3 { font-size: 14px; margin-bottom: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--card); padding: 18px; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.card .value { font-size: 24px; font-weight: 700; }
.card .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---- Tables ---- */
.table-wrap { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: #fafbfc; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
tbody tr:hover { background: #fafbfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tl-green { color: var(--green); font-weight: 600; }
.tl-yellow { color: var(--yellow); font-weight: 600; }
.tl-red { color: var(--red); font-weight: 600; }

/* ---- Chart wrapper ---- */
.chart { background: var(--card); padding: 18px; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--border); height: 420px; }

/* ---- States ---- */
.loading, .empty, .error-state { padding: 40px; text-align: center; color: var(--text-muted); }
.error-state { color: var(--red); }

/* ---- Form ---- */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: end; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted); gap: 4px; flex: 1; min-width: 140px; }
.form-row input, .form-row select { padding: 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; }
.btn { padding: 8px 16px; background: var(--primary); color: white; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; }
.btn:hover { background: var(--primary-hover); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #fafbfc; }
.btn-danger { background: var(--red); }

/* ---- Toast ---- */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--text); color: white; padding: 12px 20px;
    border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

/* ---- Badges ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.green { background: #e6f8f0; color: var(--green); }
.badge.yellow { background: #fff4e0; color: var(--yellow); }
.badge.red { background: #fde8e8; color: var(--red); }
.badge.gray { background: #eef0f3; color: var(--text-muted); }

/* ---- Auffälligkeiten / Alerts ---- */
.alert-banner {
    background: #fff8e6; border-left: 4px solid var(--yellow);
    padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
}
.alert-banner.danger { background: #fde8e8; border-left-color: var(--red); }
