/* ============================================
   FMDashboard — "Noir Amber" Design System
   Portiert aus crm.fm-media.at/assets/css/app.css
   Nur CSS — kein PHP übernommen.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Layout */
    --sidebar-width: 272px;
    --header-height: 64px;

    /* Colors — Noir Amber */
    --fm-bg-deepest: #0A0C12;
    --fm-bg-deep: #0F1118;
    --fm-bg-base: #13151E;
    --fm-bg-raised: #181B26;
    --fm-bg-card: #1C1F2C;
    --fm-bg-card-hover: #202432;
    --fm-bg-input: #12141C;

    --fm-accent: #D4A053;
    --fm-accent-light: #E8BE78;
    --fm-accent-dim: rgba(212, 160, 83, 0.15);
    --fm-accent-glow: rgba(212, 160, 83, 0.25);

    --fm-green: #34D399;
    --fm-green-dim: rgba(52, 211, 153, 0.12);
    --fm-blue: #60A5FA;
    --fm-blue-dim: rgba(96, 165, 250, 0.12);
    --fm-red: #F87171;
    --fm-red-dim: rgba(248, 113, 113, 0.12);
    --fm-purple: #A78BFA;
    --fm-purple-dim: rgba(167, 139, 250, 0.12);

    --fm-text-primary: #E4E7F0;
    --fm-text-secondary: #8B92A8;
    --fm-text-muted: #555B73;
    --fm-text-accent: var(--fm-accent);

    --fm-border: rgba(255, 255, 255, 0.06);
    --fm-border-light: rgba(255, 255, 255, 0.04);
    --fm-border-accent: rgba(212, 160, 83, 0.2);

    --fm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --fm-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --fm-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --fm-shadow-glow: 0 0 24px rgba(212, 160, 83, 0.08);

    --fm-radius-sm: 8px;
    --fm-radius-md: 12px;
    --fm-radius-lg: 16px;
    --fm-radius-xl: 20px;

    --fm-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LIGHT MODE
   ============================================ */
[data-theme="light"] {
    --fm-bg-deepest: #F2F3F8;
    --fm-bg-deep: #FFFFFF;
    --fm-bg-base: #F7F8FB;
    --fm-bg-raised: #EFF0F5;
    --fm-bg-card: #FFFFFF;
    --fm-bg-card-hover: #FAFBFD;
    --fm-bg-input: #F2F3F8;

    --fm-accent: #B8883E;
    --fm-accent-light: #D4A053;
    --fm-accent-dim: rgba(184, 136, 62, 0.1);
    --fm-accent-glow: rgba(184, 136, 62, 0.15);

    --fm-green: #16A34A;
    --fm-green-dim: rgba(22, 163, 74, 0.08);
    --fm-blue: #2563EB;
    --fm-blue-dim: rgba(37, 99, 235, 0.08);
    --fm-red: #DC2626;
    --fm-red-dim: rgba(220, 38, 38, 0.06);
    --fm-purple: #7C3AED;
    --fm-purple-dim: rgba(124, 58, 237, 0.08);

    --fm-text-primary: #1A1D28;
    --fm-text-secondary: #4A5068;
    --fm-text-muted: #8590A6;
    --fm-text-accent: var(--fm-accent);

    --fm-border: rgba(0, 0, 0, 0.08);
    --fm-border-light: rgba(0, 0, 0, 0.04);
    --fm-border-accent: rgba(184, 136, 62, 0.25);

    --fm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --fm-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --fm-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --fm-shadow-glow: 0 0 24px rgba(184, 136, 62, 0.08);
}

/* Light mode overrides for elements with hardcoded opacity values */
[data-theme="light"] .sidebar nav a:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sidebar nav a.active {
    background: var(--fm-accent-dim);
}

[data-theme="light"] .dashboard-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .status-inactive {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary:hover {
    color: #FFFFFF;
}

[data-theme="light"] .app-content::before {
    opacity: 0.4;
}

[data-theme="light"] .sidebar {
    box-shadow: 1px 0 0 rgba(0,0,0,0.04);
}

[data-theme="light"] .app-header {
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--fm-bg-deepest);
    color: var(--fm-text-primary);
    overflow: hidden;
    height: 100vh;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--fm-text-primary);
}

a { color: var(--fm-accent); text-decoration: none; }
a:hover { color: var(--fm-accent-light); }

/* Override PicoCSS defaults */
[data-theme="dark"], :root:not([data-theme="light"]) {
    --pico-background-color: var(--fm-bg-deepest);
    --pico-color: var(--fm-text-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fm-text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fm-text-secondary); }

/* ============================================
   LAYOUT — App Grid
   ============================================ */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    height: 100vh;
    background: var(--fm-bg-deepest);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    grid-row: 1 / -1;
    background: var(--fm-bg-deep);
    border-right: 1px solid var(--fm-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

/* Subtle top accent line */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--fm-accent), transparent 80%);
}

.sidebar-brand {
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--fm-border);
    flex-shrink: 0;
}

.sidebar-brand .brand-mark {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--fm-accent);
    letter-spacing: -0.02em;
}

.sidebar-brand .brand-text {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--fm-text-primary);
    letter-spacing: -0.01em;
}

.sidebar-brand .brand-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fm-accent);
    background: var(--fm-accent-dim);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

.sidebar nav {
    padding: 0.75rem 0;
    flex: 1;
}

.sidebar nav .nav-section {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fm-text-muted);
    font-weight: 700;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 1.5rem;
    color: var(--fm-text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--fm-transition);
    position: relative;
    border: none;
    text-decoration: none;
    margin: 1px 0.5rem;
    border-radius: var(--fm-radius-sm);
}

.sidebar nav a:hover {
    color: var(--fm-text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar nav a.active {
    color: var(--fm-accent-light);
    background: var(--fm-accent-dim);
}

.sidebar nav a.active .nav-icon {
    color: var(--fm-accent);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity var(--fm-transition);
    flex-shrink: 0;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar nav a:hover .nav-icon,
.sidebar nav a.active .nav-icon {
    opacity: 1;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--fm-border);
    flex-shrink: 0;
}

.sidebar-footer .version-tag {
    font-size: 0.7rem;
    color: var(--fm-text-muted);
    letter-spacing: 0.03em;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: var(--fm-bg-deep);
    border-bottom: 1px solid var(--fm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1rem;
    z-index: 5;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-left .page-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fm-text-primary);
}

.header-left .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--fm-text-muted);
}

.header-left .breadcrumb span {
    color: var(--fm-text-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem 0.35rem 0.4rem;
    border-radius: 100px;
    background: var(--fm-bg-raised);
    border: 1px solid var(--fm-border);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fm-accent-dim), var(--fm-accent-glow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--fm-accent);
    text-transform: uppercase;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fm-text-secondary);
}

/* Theme Toggle Switch */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    width: 52px;
    height: 28px;
    border-radius: 100px;
    background: var(--fm-bg-raised);
    border: 1px solid var(--fm-border);
    cursor: pointer;
    transition: all var(--fm-transition);
    padding: 3px;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--fm-border-accent);
}

.theme-toggle .toggle-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--fm-accent);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-toggle .toggle-thumb svg {
    width: 12px;
    height: 12px;
    stroke: #0A0C12;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Moon icon (dark mode) - thumb on left */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

/* Sun icon (light mode) - thumb on right */
[data-theme="light"] .theme-toggle .toggle-thumb {
    transform: translateX(24px);
}

[data-theme="light"] .theme-toggle .toggle-thumb svg {
    stroke: #FFFFFF;
}

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.btn-logout {
    background: none;
    border: 1px solid var(--fm-border);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--fm-text-muted);
    transition: all var(--fm-transition);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-logout:hover {
    background: var(--fm-red-dim);
    color: var(--fm-red);
    border-color: rgba(248, 113, 113, 0.2);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.app-content {
    padding: 2rem 2.5rem;
    overflow-y: auto;
    background: var(--fm-bg-base);
    position: relative;
}

/* Subtle grain texture overlay */
.app-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.app-content > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.view-enter {
    animation: viewFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes viewFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.dashboard-header .greeting {
    color: var(--fm-text-secondary);
    font-size: 0.9rem;
}

.dashboard-header .greeting strong {
    color: var(--fm-accent);
}

/* Metric Cards Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-md);
    padding: 1.25rem 1.35rem;
    position: relative;
    overflow: hidden;
    transition: all var(--fm-transition);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.metric-card:nth-child(1)::before { background: var(--fm-accent); }
.metric-card:nth-child(2)::before { background: var(--fm-blue); }
.metric-card:nth-child(3)::before { background: var(--fm-green); }
.metric-card:nth-child(4)::before { background: var(--fm-purple); }

.metric-card:hover {
    border-color: var(--fm-border-accent);
    box-shadow: var(--fm-shadow-glow);
    transform: translateY(-1px);
}

.metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fm-text-muted);
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.metric-value {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.metric-card:nth-child(1) .metric-value { color: var(--fm-accent); }
.metric-card:nth-child(2) .metric-value { color: var(--fm-blue); }
.metric-card:nth-child(3) .metric-value { color: var(--fm-green); }
.metric-card:nth-child(4) .metric-value { color: var(--fm-purple); }

.metric-sub {
    font-size: 0.78rem;
    color: var(--fm-text-muted);
}

.metric-sub .up { color: var(--fm-green); }
.metric-sub .down { color: var(--fm-red); }

/* Dashboard Grid — Main Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
    margin-top: 0;
}

.dashboard-card {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-md);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--fm-transition);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    position: relative;
    overflow: hidden;
}

.dashboard-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0;
    transition: opacity var(--fm-transition-slow);
    pointer-events: none;
}

.dashboard-card:nth-child(1)::after { background: var(--fm-accent); }
.dashboard-card:nth-child(2)::after { background: var(--fm-blue); }
.dashboard-card:nth-child(3)::after { background: var(--fm-purple); }
.dashboard-card:nth-child(4)::after { background: var(--fm-green); }

.dashboard-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--fm-shadow-md);
    transform: translateY(-2px);
    background: var(--fm-bg-card-hover);
}

.dashboard-card:hover::after {
    opacity: 0.06;
}

.card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--fm-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon-wrap svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-card:nth-child(1) .card-icon-wrap {
    background: var(--fm-accent-dim);
    color: var(--fm-accent);
}
.dashboard-card:nth-child(2) .card-icon-wrap {
    background: var(--fm-blue-dim);
    color: var(--fm-blue);
}
.dashboard-card:nth-child(3) .card-icon-wrap {
    background: var(--fm-purple-dim);
    color: var(--fm-purple);
}
.dashboard-card:nth-child(4) .card-icon-wrap {
    background: var(--fm-green-dim);
    color: var(--fm-green);
}

.card-body h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--fm-text-primary);
}

.card-body p {
    font-size: 0.82rem;
    color: var(--fm-text-muted);
    line-height: 1.5;
    margin: 0;
}

.card-arrow {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    opacity: 0;
    transition: all var(--fm-transition);
    color: var(--fm-text-muted);
}

.card-arrow svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.dashboard-card:hover .card-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Section Title */
.section-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fm-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--fm-border);
}

/* Staggered animation for dashboard items */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

.fade-up {
    opacity: 0;
    animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   VIEW — Placeholder (for upcoming phases)
   ============================================ */
.view-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 440px;
    margin: 4rem auto;
}

.placeholder-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: var(--fm-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border);
}

.placeholder-icon-wrap svg {
    width: 32px;
    height: 32px;
    stroke: var(--fm-accent);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.view-placeholder h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--fm-text-primary);
}

.view-placeholder p {
    font-size: 0.9rem;
    color: var(--fm-text-secondary);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--fm-accent-dim);
    color: var(--fm-accent);
    border: 1px solid var(--fm-border-accent);
}

/* ============================================
   VIEW — List Pages (Kunden, Projekte, Kampagnen)
   ============================================ */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.view-header .view-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    border-radius: var(--fm-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all var(--fm-transition);
    border: 1px solid var(--fm-border);
    background: var(--fm-bg-card);
    color: var(--fm-text-secondary);
    text-decoration: none;
}

.btn:hover {
    background: var(--fm-bg-card-hover);
    color: var(--fm-text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-primary {
    background: var(--fm-accent);
    color: #0A0C12;
    border-color: var(--fm-accent);
}

.btn-primary:hover {
    background: var(--fm-accent-light);
    color: #0A0C12;
    border-color: var(--fm-accent-light);
    box-shadow: 0 0 20px rgba(212, 160, 83, 0.2);
}

/* Search Bar */
.search-bar {
    position: relative;
    width: 280px;
}

.search-bar input {
    width: 100%;
    padding: 0.55rem 0.9rem 0.55rem 2.4rem;
    border-radius: var(--fm-radius-sm);
    border: 1px solid var(--fm-border);
    background: var(--fm-bg-input);
    color: var(--fm-text-primary);
    font-size: 0.82rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all var(--fm-transition);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--fm-text-muted);
}

.search-bar input:focus {
    border-color: var(--fm-border-accent);
    box-shadow: 0 0 0 3px rgba(212, 160, 83, 0.08);
}

.search-bar .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fm-text-muted);
    pointer-events: none;
}

.search-bar .search-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Data Table */
.data-table-wrap {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-md);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table thead {
    background: var(--fm-bg-raised);
    border-bottom: 1px solid var(--fm-border);
}

.data-table th {
    padding: 0.75rem 1.15rem;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fm-text-muted);
    font-weight: 700;
}

.data-table td {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--fm-border-light);
    color: var(--fm-text-secondary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--fm-transition);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .cell-primary {
    color: var(--fm-text-primary);
    font-weight: 500;
}

.data-table .cell-link {
    color: var(--fm-accent);
    cursor: pointer;
    font-weight: 500;
}

.data-table .cell-link:hover {
    color: var(--fm-accent-light);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background: var(--fm-green-dim);
    color: var(--fm-green);
}
.status-active::before { background: var(--fm-green); }

.status-pending {
    background: var(--fm-accent-dim);
    color: var(--fm-accent);
}
.status-pending::before { background: var(--fm-accent); }

.status-inactive {
    background: rgba(255, 255, 255, 0.04);
    color: var(--fm-text-muted);
}
.status-inactive::before { background: var(--fm-text-muted); }

/* ============================================
   VIEW — Detail Pages
   ============================================ */
.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.detail-header .detail-title-group h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.detail-header .detail-subtitle {
    color: var(--fm-text-muted);
    font-size: 0.85rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-section {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-md);
    padding: 1.5rem;
}

.detail-section-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fm-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--fm-border);
}

.detail-field {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.detail-field:not(:last-child) {
    border-bottom: 1px solid var(--fm-border-light);
}

.detail-field .field-label {
    color: var(--fm-text-muted);
    font-weight: 500;
}

.detail-field .field-value {
    color: var(--fm-text-primary);
    font-weight: 500;
    text-align: right;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5px;
    bottom: 0;
    width: 1px;
    background: var(--fm-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
    padding-left: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--fm-accent);
    background: var(--fm-bg-base);
}

.timeline-item .timeline-date {
    font-size: 0.72rem;
    color: var(--fm-text-muted);
    margin-bottom: 0.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.timeline-item .timeline-content {
    font-size: 0.85rem;
    color: var(--fm-text-secondary);
    line-height: 1.5;
}

/* Full width detail section */
.detail-full-width {
    grid-column: 1 / -1;
}

/* ============================================
   VIEW — Kampagnen / Form
   ============================================ */
.form-card {
    background: var(--fm-bg-card);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-md);
    padding: 2rem;
    max-width: 640px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fm-text-muted);
    margin-bottom: 0.45rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: var(--fm-radius-sm);
    border: 1px solid var(--fm-border);
    background: var(--fm-bg-input);
    color: var(--fm-text-primary);
    font-size: 0.88rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all var(--fm-transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--fm-border-accent);
    box-shadow: 0 0 0 3px rgba(212, 160, 83, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--fm-border);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--fm-text-muted);
    fill: none;
    stroke-width: 1.2;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--fm-text-secondary);
}

.empty-state p {
    font-size: 0.82rem;
    color: var(--fm-text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .app-content {
        padding: 1.25rem;
    }
    .app-content::before {
        left: 0;
    }
    .metrics-row {
        grid-template-columns: 1fr 1fr;
    }
    .view-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-bar {
        width: 100%;
    }
}
