/* ─── planodo.de v2 — Light Minimal Theme ────────────────────────────── */
:root {
    --bg: #fff;
    --bg-secondary: #fafafa;
    --bg-hover: #f5f5f5;
    --border: #eee;
    --border-light: #f0f0f0;
    --text: #1a1a1a;
    --text-secondary: #888;
    --text-muted: #bbb;
    --accent: #1a1a1a;
    --accent-light: #f5f5f5;
    --blue: #1565C0;
    --green: #2E7D32;
    --green-bg: #E8F5E9;
    --amber: #E65100;
    --amber-bg: #FFF3E0;
    --red: #C62828;
    --red-bg: #FFEBEE;
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-w: 240px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }
.layout-centered { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w); background: var(--bg); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.sidebar-logo { padding: 24px 20px 20px; }
.sidebar-logo a { text-decoration: none; }
.logo-text { font-size: 20px; font-weight: 300; letter-spacing: -0.5px; color: var(--text); }
.logo-dot { font-size: 20px; font-weight: 300; color: var(--text-muted); }
.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius);
    color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 400;
    transition: all 0.15s; margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--accent-light); color: var(--text); font-weight: 500; }
.nav-item svg { flex-shrink: 0; opacity: 0.5; }
.nav-item.active svg { opacity: 1; }
.nav-divider { height: 1px; background: var(--border); margin: 12px 0; }
.nav-group-header { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 16px !important; cursor: default !important; }
.nav-group-header:hover { background: transparent !important; }
.nav-sub { display: block; }
.nav-sub-item { padding: 6px 16px 6px 38px !important; font-size: 13px; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.sidebar-firma { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 12px; text-transform: uppercase; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--accent-light);
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; color: var(--text-secondary);
}
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }
.sidebar-actions { display: flex; gap: 12px; }
.sidebar-actions a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.sidebar-actions a:hover { color: var(--text); }

/* ── Main ── */
.main { margin-left: var(--sidebar-w); flex: 1; padding: 32px 40px; max-width: 960px; }

/* ── Page Headers ── */
.page-header { margin-bottom: 28px; }
.page-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.page-title { font-size: 24px; font-weight: 400; letter-spacing: -0.5px; }
.page-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ── Cards ── */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 16px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 13px; font-weight: 500; }
.card-body { padding: 16px 20px; }
.card-body-flush { padding: 0; }

/* ── KPI Cards ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.kpi-value { font-size: 28px; font-weight: 300; }
.kpi-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; letter-spacing: 1px; text-transform: uppercase; }
.kpi-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; padding: 8px 16px; font-size: 11px; font-weight: 500;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.data-table tr:hover td { background: var(--bg-secondary); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Lists ── */
.list-item {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 20px;
    border-bottom: 1px solid var(--border-light); transition: background 0.1s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-secondary); }
.list-item-left { display: flex; align-items: center; gap: 12px; }
.list-item-right { display: flex; align-items: center; gap: 10px; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.form-input, .form-select {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 14px; font-family: inherit; color: var(--text); background: var(--bg);
    outline: none; transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus { border-color: var(--text-secondary); }
.form-input::placeholder { color: var(--text-muted); }
.form-select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.input-unit { position: relative; }
.input-unit .form-input { padding-right: 44px; }
.input-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 3px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 100px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px;
    font-weight: 500; font-family: inherit; cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.btn:hover { border-color: var(--text-secondary); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text); }
.btn-full { width: 100%; justify-content: center; }

/* ── Badges ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: var(--accent-light); color: var(--text-secondary); }

/* ── Pill Tags ── */
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border: 1px solid var(--border); border-radius: 100px; font-size: 12px;
}
.pill .mini-avatar {
    width: 20px; height: 20px; border-radius: 50%; background: var(--accent-light);
    display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 500;
}

/* ── Alerts / Flash ── */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 13px; }
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }
.flash-info { background: #E3F2FD; color: var(--blue); }

/* ── Login/Auth Pages ── */
.auth-card { width: 100%; max-width: 380px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.auth-logo { margin-bottom: 28px; }
.auth-logo .logo-text { font-size: 22px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 12px; color: var(--text-muted); }
.auth-footer a { color: var(--text-secondary); text-decoration: none; }
.auth-footer a:hover { color: var(--text); }

/* ── Section Labels ── */
.sec-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }

/* ── Hero Number ── */
.hero-number { font-size: 72px; font-weight: 200; letter-spacing: -3px; line-height: 1; text-align: center; }
.hero-label { font-size: 14px; color: var(--text-secondary); text-align: center; margin-top: 6px; }
.hero-sub { font-size: 14px; font-weight: 500; text-align: center; margin-top: 2px; }

/* ── Empty States ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
}
