/* communityFlow – Desktop (hell, freundlich, Apple-inspiriert / Editorial & Minimal) */

/* Brand-Font (TBC Konzept 1 „Das Netz"): Archivo für Marke + Headlines */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&display=swap');

:root {
    --accent: #FF4D2E;                 /* wird pro Community aus der DB überschrieben */
    --ink: #111111;
    --bg: #f5f5f3;
    --card: #ffffff;
    --line: rgba(17, 17, 17, 0.08);
    --label: rgba(17, 17, 17, 0.88);
    --label-2: rgba(17, 17, 17, 0.55);
    --label-3: rgba(17, 17, 17, 0.35);
    --radius: 18px;
    --shadow: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.05);
    --spring: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -0.014em;
    color: var(--label);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
.brand-logo { display: flex; flex-shrink: 0; }
.brand-logo svg, .brand-logo img { display: block; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: 'Archivo', -apple-system, sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-text span { font-size: 12px; color: var(--label-3); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px;
    color: var(--label-2); text-decoration: none;
    font-weight: 500; font-size: 15px;
    transition: background .18s var(--spring), color .18s var(--spring);
}
.nav-link i { font-size: 21px; }
.nav-link:hover { background: rgba(17,17,17,.045); color: var(--label); }
.nav-link.active { background: var(--ink); color: #fff; }
.nav-badge {
    margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 100px;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

.sidebar-footer {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px;
}
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip i { font-size: 30px; color: var(--label-3); }
.user-chip div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-chip strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip span { font-size: 12px; color: var(--label-3); }
.logout { color: var(--label-3); font-size: 20px; padding: 8px; border-radius: 10px; }
.logout:hover { color: var(--accent); background: rgba(17,17,17,.045); }

/* --- Main --- */
.main { flex: 1; min-width: 0; padding: 28px 36px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.topbar h1 { font-family: 'Archivo', -apple-system, sans-serif; font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.pwa-hint {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--label-2); text-decoration: none; font-size: 14px; font-weight: 500;
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; background: var(--card);
}
.pwa-hint:hover { color: var(--label); }

.flash { padding: 13px 18px; border-radius: 14px; margin-bottom: 20px; font-size: 15px; font-weight: 500; }
.flash-success { background: rgba(52, 199, 89, .12); color: #1d7a3d; }
.flash-error   { background: rgba(255, 59, 48, .10); color: #b3261e; }
.flash-info    { background: rgba(17, 17, 17, .06);  color: var(--label-2); }

/* --- Karten & Grids --- */
.card {
    background: var(--card); border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 24px;
}
.card h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.stat .stat-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; margin-bottom: 14px;
    background: rgba(17,17,17,.05); color: var(--label-2);
}
.stat .stat-icon.accent { background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); }
.stat .stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.stat .stat-label { font-size: 13px; color: var(--label-2); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* --- Formulare & Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; border-radius: 100px; border: none; cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
    background: var(--ink); color: #fff; text-decoration: none;
    transition: transform .15s var(--spring), opacity .15s;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); }
.btn-ghost { background: transparent; color: var(--label); border: 1px solid var(--line); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--label-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 14px; font-family: inherit; font-size: 15px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--label);
    outline: none; transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: #fff; }

/* --- Auth-Seiten (Login/Registrierung) --- */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: var(--bg);
}
.auth-card {
    width: 100%; max-width: 420px; background: var(--card);
    border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
    padding: 40px 36px;
}
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; text-align: center; }
.auth-brand .brand-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.auth-brand h1 { font-family: 'Archivo', -apple-system, sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.auth-brand p { font-size: 14px; color: var(--label-2); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--label-2); }
.auth-alt a { color: var(--label); font-weight: 600; }

/* --- Tabellen --- */
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--label-3); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
table.list tr:last-child td { border-bottom: none; }

/* Taler-Badge (hell, hinter dem Namen) */
.taler-badge {
    display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
    background: color-mix(in srgb, var(--accent) 12%, white);
    color: var(--accent); border-radius: 100px;
    padding: 3px 10px; font-size: 11px; font-weight: 800; letter-spacing: .02em;
    white-space: nowrap;
}
.taler-badge i { color: var(--accent); font-size: 13px; }

/* Skill-Chips */
.chip {
    display: inline-block; padding: 8px 15px; border-radius: 100px;
    border: 1px solid var(--line); background: var(--card);
    font-size: 13.5px; font-weight: 600; color: var(--label-2);
    transition: all .15s var(--spring);
}
.chip-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty { text-align: center; padding: 48px 20px; color: var(--label-3); }
.empty i { font-size: 44px; display: block; margin-bottom: 10px; }
