/* ═══════════════════════════════════════════════════════════
   PULSE 360 — v2 Design System (Stripe-inspired)
   Sidebar: #0A2540 (Stripe navy)
   Primary: #635BFF (Stripe signature purple)
   Font: Plus Jakarta Sans (heading) + Inter (body)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    /* Stripe Palette */
    --c-primary: #635BFF;
    --c-primary-dark: #5449E6;
    --c-primary-light: #F0EEFF;
    --c-primary-50: #F5F3FF;
    --c-secondary: #00D4AA;
    --c-body: #546B82;
    --c-body-dark: #0A2540;
    --c-bg: #F6F8FA;
    --c-white: #FFFFFF;
    --c-card: #FFFFFF;
    --c-border: #E3E8EE;
    --c-border-light: #EDF0F4;
    --c-stroke: #E3E8EE;
    --c-muted: #546B82;
    --c-muted-light: #8898AA;
    --c-success: #00D4AA;
    --c-success-light: #EEFBF6;
    --c-warning: #FF9500;
    --c-warning-light: #FFF6E8;
    --c-danger: #FF4B4B;
    --c-danger-light: #FFF1F0;
    --c-info: #635BFF;
    --c-info-light: #F0EEFF;

    /* Sidebar — Stripe dark navy */
    --sidebar-w: 240px;
    --sidebar-bg: #0A2540;
    --sidebar-menu-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(99,91,255,0.12);
    --sidebar-text: rgba(255,255,255,0.7);
    --sidebar-text-muted: rgba(255,255,255,0.35);
    --sidebar-border: rgba(255,255,255,0.08);

    /* Typography */
    --font-h: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --font-b: 'Inter', -apple-system, system-ui, sans-serif;

    /* Radius */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 14px;
    --r-2xl: 16px;

    /* Shadows — Stripe style: layered and soft */
    --sh-card: 0 1px 3px rgba(10,37,64,0.04), 0 1px 2px rgba(10,37,64,0.02);
    --sh-card-hover: 0 6px 20px rgba(10,37,64,0.07);
    --sh-dropdown: 0 8px 28px rgba(10,37,64,0.12);
    --sh-input-focus: 0 0 0 3px rgba(99,91,255,0.12);

    /* Transitions */
    --t-fast: 120ms ease;
    --t-base: 180ms ease;
    --t-slow: 280ms ease;

    /* Header */
    --header-h: 0px;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }

body {
    font-family: var(--font-b);
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-body-dark);
    background: var(--c-bg);
}

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-h);
    font-weight: 700;
    color: var(--c-body-dark);
    line-height: 1.3;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }

/* ── SHELL ──────────────────────────────────────────────── */
.p-shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.p-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex; flex-direction: column;
    z-index: 50;
    overflow: hidden;
}

.p-sidebar-brand {
    height: 64px;
    display: flex; align-items: center;
    padding: 0 20px; gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
}

.p-sidebar-brand-dot {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
    transition: transform var(--t-base);
}
.p-sidebar-brand:hover .p-sidebar-brand-dot { transform: scale(1.05); }

.p-sidebar-brand-name {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 15px;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.p-sidebar-brand-sub {
    font-size: 11px;
    color: var(--sidebar-text-muted);
    font-weight: 400;
}

/* Sidebar Nav */
.p-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.p-nav-section {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sidebar-text-muted);
    padding: 20px 12px 8px;
}

.p-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 7px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--t-fast);
    margin-bottom: 1px;
    position: relative;
}

.p-nav-link:hover {
    background: var(--sidebar-menu-hover);
    color: rgba(255,255,255,0.9);
}

.p-nav-link.active {
    background: var(--sidebar-active);
    color: #FFFFFF;
}

.p-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    background: var(--c-primary);
    border-radius: 0 3px 3px 0;
}

.p-nav-link svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: 0.5;
    stroke-width: 1.8;
}
.p-nav-link:hover svg, .p-nav-link.active svg { opacity: 1; }

.p-nav-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c-primary);
    margin-left: auto;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(99,91,255,0.5);
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.85)} }

/* Sidebar User */
.p-sidebar-user {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex; align-items: center; gap: 10px;
}

.p-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-h); font-weight: 600;
    font-size: 12px; flex-shrink: 0;
}
.p-avatar-gl { background: var(--c-primary); color: white; }
.p-avatar-fk { background: rgba(0,212,170,0.15); color: var(--c-success); border: 1px solid rgba(0,212,170,0.3); }
.p-avatar-neutral { background: var(--c-bg); color: var(--c-muted); }

.p-sidebar-user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); }
.p-sidebar-user-role { font-size: 11px; color: var(--sidebar-text-muted); }

.p-sidebar-logout {
    margin-left: auto; background: none; border: none;
    color: rgba(255,255,255,0.25); cursor: pointer; padding: 6px; border-radius: var(--r-sm);
    transition: all var(--t-fast); display: flex; align-items: center; justify-content: center;
}
.p-sidebar-logout:hover { color: var(--c-danger); background: rgba(255,75,75,0.1); }

/* ── MAIN CONTENT ───────────────────────────────────────── */
.p-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 32px 36px;
    max-width: calc(100% - var(--sidebar-w));
}

/* ── PAGE HEADER ────────────────────────────────────────── */
.p-page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 2px;
    color: var(--c-body-dark);
}

.p-page-sub {
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: 28px;
}

.p-breadcrumb {
    font-size: 13px;
    color: var(--c-muted);
    margin-bottom: 8px;
}
.p-breadcrumb a { color: var(--c-muted); }
.p-breadcrumb a:hover { color: var(--c-primary); }

/* ── CARDS ──────────────────────────────────────────────── */
.p-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-card);
    overflow: hidden;
    transition: box-shadow var(--t-base);
}

.p-card:hover {
    box-shadow: var(--sh-card-hover);
}

.p-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--c-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p-card-title {
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 700;
    color: var(--c-body-dark);
}

.p-card-pad { padding: 22px; }

/* ── STAT TILES ─────────────────────────────────────────── */
.p-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.p-tile {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    padding: 22px;
    box-shadow: var(--sh-card);
    transition: all var(--t-base);
    text-decoration: none;
    color: inherit;
    display: block;
}

.p-tile:hover {
    border-color: var(--c-primary);
    box-shadow: var(--sh-card-hover);
    transform: translateY(-1px);
}

.p-tile-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.p-tile-icon svg { width: 20px; height: 20px; }

.p-tile h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-muted);
    margin-bottom: 6px;
}

.p-tile .p-tile-value {
    font-family: var(--font-h);
    font-size: 28px;
    font-weight: 700;
    color: var(--c-body-dark);
    letter-spacing: -0.03em;
    line-height: 1;
}

.p-tile p {
    font-size: 12px;
    color: var(--c-muted-light);
    margin-top: 4px;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.p-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-b);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--t-fast);
    line-height: 1.4;
}
.p-btn svg { width: 16px; height: 16px; }

.p-btn-primary {
    background: var(--c-primary);
    color: white;
}
.p-btn-primary:hover {
    background: var(--c-primary-dark);
    box-shadow: 0 4px 12px rgba(99,91,255,0.25);
    transform: translateY(-1px);
    color: white;
}

.p-btn-accent {
    background: var(--c-success);
    color: white;
}
.p-btn-accent:hover {
    background: #00BF9A;
    transform: translateY(-1px);
    color: white;
}

.p-btn-outline {
    background: white;
    color: var(--c-body-dark);
    border: 1px solid var(--c-border);
}
.p-btn-outline:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    background: var(--c-primary-50);
}

.p-btn-ghost {
    background: transparent;
    color: var(--c-body);
    padding: 6px 10px;
}
.p-btn-ghost:hover { background: var(--c-bg); color: var(--c-body-dark); }

.p-btn-sm { font-size: 12px; padding: 6px 12px; }
.p-btn-sm svg { width: 14px; height: 14px; }

.p-btn-danger { background: var(--c-danger-light); color: var(--c-danger); }
.p-btn-danger:hover { background: #FECACA; }

/* ── BADGES ─────────────────────────────────────────────── */
.p-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}
.p-badge-blue { background: var(--c-info-light); color: var(--c-primary); }
.p-badge-green { background: var(--c-success-light); color: #0D7D5F; }
.p-badge-amber { background: var(--c-warning-light); color: #8A5600; }
.p-badge-red { background: var(--c-danger-light); color: #A61D1D; }
.p-badge-slate { background: #F1F5F9; color: #475569; }

/* ── TABLES ─────────────────────────────────────────────── */
.p-table { width: 100%; border-collapse: separate; border-spacing: 0; }

.p-table th {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--c-muted);
    padding: 10px 20px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.p-table td {
    padding: 12px 20px;
    font-size: 13.5px;
    color: var(--c-body-dark);
    border-bottom: 1px solid var(--c-border-light);
    transition: background var(--t-fast);
}

.p-table tr:hover td { background: #FAFBFC; }
.p-table tr:last-child td { border-bottom: none; }

/* ── FORMS ──────────────────────────────────────────────── */
.p-input, .p-select, .p-textarea {
    width: 100%;
    font-family: var(--font-b);
    font-size: 13.5px;
    padding: 9px 14px;
    border: 1px solid var(--c-border);
    border-radius: 7px;
    background: white;
    color: var(--c-body-dark);
    outline: none;
    transition: all var(--t-fast);
}

.p-input:focus, .p-select:focus, .p-textarea:focus {
    border-color: var(--c-primary);
    box-shadow: var(--sh-input-focus);
}

.p-input::placeholder { color: #C1C9D2; }

.p-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-body-dark);
    margin-bottom: 6px;
}
.p-label-sub { font-weight: 400; color: var(--c-muted); }

/* ── ALERTS ─────────────────────────────────────────────── */
.p-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-lg);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.p-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.p-alert-info { background: var(--c-info-light); border-color: #D4CBFF; color: #4338CA; }
.p-alert-success { background: var(--c-success-light); border-color: #A7F3D0; color: #0D7D5F; }
.p-alert-warning { background: var(--c-warning-light); border-color: #FDE68A; color: #8A5600; }
.p-alert-danger { background: var(--c-danger-light); border-color: #FECACA; color: #A61D1D; }

/* ── PROGRESS ───────────────────────────────────────────── */
.p-progress {
    width: 100%; height: 4px;
    background: var(--c-border);
    border-radius: 100px;
    overflow: hidden;
}
.p-progress-bar {
    height: 100%;
    background: var(--c-primary);
    border-radius: 100px;
    transition: width 0.8s ease;
}

/* ── EMPTY STATE ────────────────────────────────────────── */
.p-empty {
    text-align: center;
    padding: 48px 28px;
    color: var(--c-body);
}
.p-empty svg { width: 48px; height: 48px; color: var(--c-muted-light); margin: 0 auto 16px; stroke-width: 1; }
.p-empty h3 { font-family: var(--font-h); font-size: 16px; font-weight: 700; color: var(--c-body-dark); margin-bottom: 4px; }
.p-empty p { font-size: 13px; color: var(--c-muted); }

/* ── COCKPIT v2 — Bento Grid ───────────────────────────── */
.v2-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.v2-col-3 { grid-column: span 3; }
.v2-col-4 { grid-column: span 4; }
.v2-col-5 { grid-column: span 5; }
.v2-col-6 { grid-column: span 6; }
.v2-col-7 { grid-column: span 7; }
.v2-col-8 { grid-column: span 8; }
.v2-col-12 { grid-column: span 12; }
.v2-row-2 { grid-row: span 2; }

/* Cycle banner tile */
.v2-cycle {
    background: linear-gradient(135deg, #0A2540 0%, #1B3A5C 50%, #0A2540 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}
.v2-cycle::after {
    content: '';
    position: absolute;
    top: -40%; right: -20%;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(99,91,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.v2-cycle .v2-label { color: rgba(255,255,255,0.4); }
.v2-cycle .v2-value { color: white; }
.v2-cycle .v2-sub { color: rgba(255,255,255,0.35); }

.v2-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.v2-value {
    font-family: var(--font-h);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--c-body-dark);
    line-height: 1;
}
.v2-sub {
    font-size: 12px;
    color: var(--c-muted-light);
    margin-top: 3px;
}

/* Stat icon box */
.v2-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.v2-icon svg { width: 18px; height: 18px; }
.v2-icon-purple { background: var(--c-primary-light); color: var(--c-primary); }
.v2-icon-green { background: var(--c-success-light); color: var(--c-success); }

/* Person row */
.v2-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background var(--t-fast);
}
.v2-person:hover { background: var(--c-bg); }
.v2-person-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--c-primary-light);
    color: var(--c-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 11px; flex-shrink: 0;
}
.v2-person-name { font-size: 13.5px; font-weight: 600; color: var(--c-body-dark); }
.v2-person-detail { font-size: 12px; color: var(--c-muted-light); }

/* Status pills */
.v2-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 100px;
}
.v2-pill-green { background: var(--c-success-light); color: #0D7D5F; }
.v2-pill-orange { background: var(--c-warning-light); color: #8A5600; }
.v2-pill-red { background: var(--c-danger-light); color: #A61D1D; }

/* Action grid */
.v2-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.v2-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-fast);
    background: var(--c-bg);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}
.v2-action:hover {
    border-color: rgba(99,91,255,0.3);
    background: var(--c-primary-light);
    color: inherit;
}
.v2-action svg { width: 15px; height: 15px; color: var(--c-primary); flex-shrink: 0; }
.v2-action span { font-size: 12.5px; font-weight: 500; color: var(--c-body-dark); }

/* Chart bars */
.v2-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 48px;
    margin-top: 10px;
}
.v2-bar {
    flex: 1;
    border-radius: 3px;
    background: var(--c-border-light);
    transition: background var(--t-fast);
}
.v2-bar:hover { background: var(--c-primary-light); }
.v2-bar.current { background: var(--c-primary); }

/* Activity feed */
.v2-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border-light);
}
.v2-feed-item:last-child { border-bottom: none; }
.v2-feed-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-primary);
    margin-top: 6px;
    flex-shrink: 0;
}
.v2-feed-text { font-size: 13px; color: var(--c-body); }
.v2-feed-time { font-size: 11px; color: var(--c-muted-light); margin-top: 1px; }

/* FK task cards */
.v2-task {
    background: var(--c-card);
    border-radius: var(--r-xl);
    padding: 18px 20px;
    border: 1px solid var(--c-border);
    box-shadow: var(--sh-card);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--t-base);
    cursor: pointer;
    margin-bottom: 8px;
}
.v2-task:hover { box-shadow: var(--sh-card-hover); transform: translateY(-1px); }
.v2-task-marker {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--c-border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-h); font-weight: 700;
    font-size: 11px; color: var(--c-muted-light); flex-shrink: 0;
}
.v2-task-marker.done {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: white;
}
.v2-task-title { font-size: 14px; font-weight: 600; color: var(--c-body-dark); }
.v2-task-desc { font-size: 12.5px; color: var(--c-muted); margin-top: 1px; }
.v2-task-cta {
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: var(--font-b);
    transition: all var(--t-fast);
    text-decoration: none;
    display: inline-block;
}
.v2-task-cta-primary { background: var(--c-primary); color: white; }
.v2-task-cta-primary:hover { background: var(--c-primary-dark); color: white; }
.v2-task-cta-done { background: var(--c-success-light); color: #0D7D5F; cursor: default; }

/* FK banner */
.v2-fk-banner {
    background: linear-gradient(135deg, #0A2540 0%, #1B3A5C 100%);
    color: white;
    border-radius: var(--r-xl);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.v2-fk-banner::after {
    content: '';
    position: absolute;
    top: -50%; right: -15%;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(99,91,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.v2-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 24px 0 10px;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.p-appear { animation: fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.p-d1 { animation-delay: 40ms; }
.p-d2 { animation-delay: 80ms; }
.p-d3 { animation-delay: 120ms; }
.p-d4 { animation-delay: 160ms; }

/* ── UTILITY ────────────────────────────────────────────── */
.p-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.p-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.p-flex { display: flex; align-items: center; }
.p-flex-between { display: flex; align-items: center; justify-content: space-between; }
.p-gap-1 { gap: 4px; }
.p-gap-2 { gap: 8px; }
.p-gap-3 { gap: 12px; }
.p-gap-4 { gap: 16px; }
.p-mb-2 { margin-bottom: 8px; }
.p-mb-3 { margin-bottom: 12px; }
.p-mb-4 { margin-bottom: 16px; }
.p-mb-6 { margin-bottom: 24px; }
.p-mb-8 { margin-bottom: 32px; }
.p-text-sm { font-size: 13px; }
.p-text-xs { font-size: 11px; }
.p-text-muted { color: var(--c-muted); }
.p-text-right { text-align: right; }
.p-text-center { text-align: center; }
.p-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .p-sidebar { transform: translateX(-100%); transition: transform var(--t-slow); }
    .p-sidebar.open { transform: translateX(0); }
    .p-main { margin-left: 0; padding: 24px 16px; max-width: 100%; }
    .p-grid-2, .p-grid-3 { grid-template-columns: 1fr; }
    .v2-bento { grid-template-columns: 1fr; }
    .v2-col-3,.v2-col-4,.v2-col-5,.v2-col-6,.v2-col-7,.v2-col-8,.v2-col-12 { grid-column: span 1; }
}

@media (max-width: 640px) {
    .p-tiles { grid-template-columns: 1fr; }
    .v2-actions { grid-template-columns: 1fr; }
}

/* Fix: SVG size constraints in bento grid */
.v2-bento .p-tile svg { max-width: 20px; max-height: 20px; }
.v2-bento .v2-person-avatar { min-width: 30px; }
.v2-cycle::after { z-index: 0; }

/* ── Readability Fix ─── */
body { font-size: 15px; }
.p-main { padding: 36px 44px; }
.p-page-title { font-size: 28px; }
.v2-label, .p-nav-section { font-size: 12px; letter-spacing: 0.05em; }
.v2-value { font-size: 32px; }
.v2-sub, .v2-person-detail { font-size: 13px; }
.v2-person-name { font-size: 14.5px; }
.v2-pill { font-size: 12px; padding: 4px 11px; }
.v2-feed-text { font-size: 14px; }
.v2-feed-time { font-size: 12px; }
.v2-action span { font-size: 13.5px; }
.p-card-title { font-size: 16px; }
.p-nav-link { font-size: 14px; padding: 9px 12px; }

/* Stronger contrast */
:root {
    --c-muted: #475569;
    --c-muted-light: #64748B;
    --c-body: #334155;
}

/* More breathing room */
.v2-bento { gap: 16px; }
.v2-person { padding: 11px 10px; gap: 14px; }
.v2-person-avatar { width: 34px; height: 34px; font-size: 12px; }
.p-tile { padding: 24px; }

/* Fix: constrain all SVGs in cards and content */
.p-card svg, .p-main svg { max-width: 24px; max-height: 24px; }
.p-sidebar svg { max-width: 20px; max-height: 20px; }
.p-btn svg { max-width: 18px; max-height: 18px; }

/* ── Settings Tabs ─── */
.p-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--c-border-light);
    margin-bottom: 24px;
}
.p-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-family: var(--font-b);
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: var(--c-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}
.p-tab:hover { color: var(--c-body-dark); }
.p-tab.active, .p-tab[data-active="true"] {
    color: var(--c-primary);
    border-bottom-color: var(--c-primary);
    font-weight: 600;
}

/* Smooth scrollbars in tiles */
.p-tile div[style*="overflow-y"] {
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) transparent;
}
.p-tile div[style*="overflow-y"]::-webkit-scrollbar { width: 4px; }
.p-tile div[style*="overflow-y"]::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }

/* Hidden scrollbar, shows on hover */
.v2-scroll { max-height: 400px; overflow-y: auto; scrollbar-width: none; }
.v2-scroll:hover { scrollbar-width: thin; scrollbar-color: var(--c-border) transparent; }
.v2-scroll::-webkit-scrollbar { width: 0; }
.v2-scroll:hover::-webkit-scrollbar { width: 4px; }
.v2-scroll::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }

/* Smooth accordion transitions */
[x-collapse] { transition: height 0.2s ease; }

/* ── BONUS-SYSTEM ERGÄNZUNGEN ───────────────────────────── */
.p-card-body { padding: 18px 22px; }
.p-btn-secondary { background: var(--c-bg); color: var(--c-body); border: 1px solid var(--c-border); }
.p-btn-secondary:hover { background: var(--c-border-light); }
.p-page-desc { color: var(--c-muted); font-size: 14px; margin-top: 4px; }
.p-hint { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.p-error { font-size: 12px; color: var(--c-danger); margin-top: 4px; }
.p-badge-success { background: var(--c-success-light); color: #0D7D5F; }
.p-badge-warning { background: var(--c-warning-light); color: #8A5600; }
.p-badge-muted { background: #F1F5F9; color: #475569; }
.p-badge-info { background: var(--c-info-light); color: var(--c-primary); }

/* ── HILFE-BOX ──────────────────────────────────────────── */
.p-hilfe { background: var(--c-info-light, #EEF2FF); border: 1px solid #D4CBFF; border-radius: 10px; margin-bottom: 1.5rem; overflow: hidden; }
.p-hilfe-toggle { width: 100%; display: flex; align-items: center; gap: .5rem; padding: 14px 20px; background: none; border: none; cursor: pointer; font-family: var(--font-h); font-size: 14px; font-weight: 600; color: var(--c-primary); text-align: left; }
.p-hilfe-toggle svg { width: 16px; height: 16px; transition: transform .2s; flex-shrink: 0; }
.p-hilfe-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.p-hilfe-body { padding: 0 20px 18px 20px; font-size: 13.5px; line-height: 1.7; color: #4338CA; }
.p-hilfe-body h4 { font-size: 13.5px; font-weight: 700; margin: 12px 0 4px 0; }
.p-hilfe-body h4:first-child { margin-top: 0; }
.p-hilfe-body ul { margin: 4px 0 8px 0; padding-left: 18px; }
.p-hilfe-body li { margin-bottom: 2px; }
.p-hilfe-body strong { font-weight: 600; }
.p-hilfe-body .p-hilfe-beispiel { background: rgba(99,91,255,.08); border-radius: 6px; padding: 10px 14px; margin: 8px 0; font-size: 13px; }

/* ── WIZARD STEPS ───────────────────────────────────────── */
.p-wizard-steps { display: flex; align-items: center; justify-content: center; gap: 0; padding: 1.5rem 0 2rem; }
.p-wizard-step { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--c-muted); }
.p-wizard-step.active { color: var(--c-primary); font-weight: 600; }
.p-wizard-step.done { color: var(--c-success); }
.p-wizard-dot {
    width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; border: 2px solid var(--c-border); color: var(--c-muted); background: var(--c-white);
}
.p-wizard-step.active .p-wizard-dot { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.p-wizard-step.done .p-wizard-dot { border-color: var(--c-success); background: var(--c-success); color: #fff; }
.p-wizard-line { width: 40px; height: 2px; background: var(--c-border); }
.p-wizard-line.active { background: var(--c-success); }
