/* ================================================================
   ProzessTool – Globales CSS-Design-System
   Sprache: Deutsch | Framework: Vanilla CSS | Font: Inter
   ================================================================ */

/* ── IMPORT FONT ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS (CSS Custom Properties) ───────────────────── */
:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.15);

    --accent: #06B6D4;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    --bg: #F1F5F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --border: rgba(0, 0, 0, 0.07);
    --border-strong: rgba(0, 0, 0, 0.12);
    --text: #0F172A;
    --text-muted: #64748B;
    --text-subtle: #94A3B8;

    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-primary: 0 8px 24px rgba(99, 102, 241, 0.25);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --nav-height: 64px;
    --content-max: 1280px;
    --content-pad: 2rem;
}

/* ── DARK MODE ───────────────────────────────────────────────── */
[data-theme="dark"] {
    --bg: #0D0F14;
    --surface: #1A1D27;
    --surface-2: rgba(32, 36, 50, 0.5);
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-subtle: #475569;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img,
svg {
    max-width: 100%;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

h2 {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-muted {
    color: var(--text-muted);
}

.text-subtle {
    color: var(--text-subtle);
}

.text-sm {
    font-size: 0.8125rem;
}

.required {
    color: var(--danger);
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.main-content {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) var(--content-pad) 3rem;
    min-height: calc(100vh - 48px);
}

/* ── NAVIGATION ──────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 29, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: var(--border);
}

.navbar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--content-pad);
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.brand-name {
    color: var(--text);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 1.5rem;
    flex: 1;
}

.nav-link {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    background: var(--primary-glow);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition);
    color: var(--text);
}

.theme-toggle:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
}

[data-theme="light"] .theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-moon {
    display: block;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}

[data-theme="dark"] .theme-icon-sun {
    display: block;
}

/* User Chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.user-avatar--sm {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.role-badge {
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-white {
    background: white;
    color: var(--primary);
    font-weight: 700;
}

.btn-white:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    color: var(--primary-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-size: 0.8rem;
}

.btn-outline:hover {
    background: var(--primary-glow);
}

.btn-danger {
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

.btn-danger:hover {
    background: #DC2626;
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-input,
.form-textarea,
.form-select {
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 70px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Input mit Icon */
.input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon {
    padding-left: 2.75rem;
}

.input-with-toggle {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
    outline: none;
    box-shadow: none;
    line-height: 1;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-group--prio {
    max-width: 300px;
}

.admin-only-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 0.1rem 0.4rem;
    border-radius: 100px;
    margin-left: 0.375rem;
}

/* Checkbox Cards */
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.checkbox-card:hover:not(.disabled) {
    border-color: var(--primary-light);
    background: var(--surface);
}

.checkbox-card input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg);
}

.checkbox-card.disabled input {
    cursor: not-allowed;
}

/* History Status Changes */
.version-status-changes {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.status-change-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.status-change-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}

.status-change-item:last-child {
    margin-bottom: 0;
}

.status-change-label {
    font-weight: 600;
}

.status-change-arrow {
    color: var(--text-subtle);
}

.status-change-val {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-change-val--added {
    background: var(--success);
    color: white;
}

.status-change-val--removed {
    background: var(--danger);
    color: white;
}

.status-change-text {
    font-style: italic;
    color: var(--text-muted);
}

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: background var(--transition), border-color var(--transition);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

.card-body {
    padding: 1.5rem;
}

.card-body--flush {
    padding: 0;
}

.card--sticky {
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
}

/* ── FLASH MESSAGES ──────────────────────────────────────────── */
.flash-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--content-pad);
    margin-top: calc(var(--nav-height) + 1rem);
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.flash--erfolg {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.flash--fehler {
    background: rgba(239, 68, 68, 0.1);
    color: #991B1B;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.flash--warnung {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .flash--erfolg {
    color: #6EE7B7;
    border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .flash--fehler {
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .flash--warnung {
    color: #FCD34D;
    border-color: rgba(245, 158, 11, 0.4);
}

.flash--inline {
    margin-bottom: 1.25rem;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    line-height: 1;
    padding: 0;
}

.flash-close:hover {
    opacity: 1;
}

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.badge--prio-1 {
    background: rgba(239, 68, 68, 0.12);
    color: #DC2626;
}

.badge--prio-2 {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
}

.badge--prio-3 {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.badge--no-prio {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
}

.badge--aktuell {
    background: var(--primary-glow);
    color: var(--primary);
    margin-left: 0.5rem;
}

.badge--neu {
    background: var(--warning);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.prozess-badges-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
    border: 1.5px solid white;
}

.status-dot--geprueft {
    background-color: var(--success);
}

.status-dot--bearbeitung {
    background-color: var(--primary);
}

.status-dot--test {
    background-color: var(--accent);
}

.status-dot--freigabe {
    background-color: #7C3AED;
}

/* Purple */
.status-dot--aenderung {
    background-color: var(--danger);
}

.prozess-card--neu {
    border-left: 4px solid var(--warning);
}

.badge--neutral {
    background: var(--surface-2);
    color: var(--text-muted);
}

.badge--role-admin {
    background: var(--primary-glow);
    color: var(--primary);
}

.badge--role-user {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
}

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0.25rem 0 0;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding-top: 0.5rem;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.version-badge {
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 100px;
}

/* ── HERO BANNER ─────────────────────────────────────────────── */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 45%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
    color: white;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.hero-greeting {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
}

.hero-decoration {
    position: absolute;
    right: -60px;
    top: -60px;
    z-index: 0;
}

.hero-ring {
    width: 280px;
    height: 280px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    position: absolute;
    top: 0;
    right: 0;
}

.hero-ring--2 {
    width: 200px;
    height: 200px;
    top: 40px;
    right: 40px;
    border-color: rgba(255, 255, 255, 0.07);
}

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stats-section {
    margin-bottom: 2.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon--blue {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.stat-icon--orange {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.stat-icon--green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.2rem;
    display: block;
}

/* ── KANBAN DASHBOARD ────────────────────────────────────────── */

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.prozess-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Neue-Prozess-Karte */
.prozess-card--neu {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-primary);
}

.prozess-card--neu:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.35);
}

.neu-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.neu-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.neu-card-inner strong {
    font-size: 1rem;
    font-weight: 700;
}

.neu-card-inner span {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* Prozess-Karte */
.prozess-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.prozess-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.prozess-card-top-border {
    height: 3px;
    background: transparent;
    transition: background var(--transition);
}

.prozess-card:hover .prozess-card-top-border {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.prozess-card-body {
    padding: 1.25rem;
    flex: 1;
}

.prozess-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.abteilung-badge {
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.prozess-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.875rem;
    line-height: 1.4;
}

.prozess-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.meta-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meta-date {
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.prozess-card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.version-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    background: var(--primary-glow);
    padding: 0.2rem 0.625rem;
    border-radius: 100px;
    transition: all var(--transition);
}

.version-link:hover {
    background: var(--primary);
    color: white;
}

.empty-state-inline {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── PROZESSSCHRITTE EDITOR ──────────────────────────────────── */
.schritte-container {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.schritt-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    animation: slideDown 0.2s ease;
}

.schritt-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.schritt-item.sortable-ghost {
    opacity: 0.4;
    background: var(--primary-glow);
    border-color: var(--primary);
}

.schritt-item.sortable-drag {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    z-index: 999;
}

.schritt-handle {
    cursor: grab;
    color: var(--text-subtle);
    font-size: 1.2rem;
    padding: 0.2rem 0.1rem;
    user-select: none;
    flex-shrink: 0;
    margin-top: 0.3rem;
    transition: color var(--transition);
}

.schritt-handle:hover {
    color: var(--primary);
}

.schritt-handle:active {
    cursor: grabbing;
}

.schritt-nummer {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.35rem;
}

.schritt-felder {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schritt-titel {
    font-weight: 600;
    border-color: transparent;
    background: transparent;
}

.schritt-titel:focus {
    border-color: var(--primary);
    background: var(--surface);
}

.schritt-beschreibung {
    font-size: 0.875rem;
    color: var(--text-muted);
    background: transparent;
    border-color: transparent;
    min-height: 50px;
}

.schritt-beschreibung:focus {
    border-color: var(--primary);
    background: var(--surface);
    color: var(--text);
}

.schritt-aktionen {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex-shrink: 0;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.btn-icon--add:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.btn-icon--delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* Schritt hinzufügen Button */
.btn-add-schritt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.875rem;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-add-schritt:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

/* ── VERSIONSVERLAUF ─────────────────────────────────────────── */
.versionen-liste {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.version-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.version-card:hover {
    box-shadow: var(--shadow);
}

.version-card--aktuell {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}

.version-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.version-card--aktuell .version-card-header {
    background: var(--primary-glow);
}

.version-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.version-nummer {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
}

.version-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.version-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.version-schritte {
    padding: 1.5rem;
}

.schritt-liste-readonly {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    counter-reset: schritt;
}

.schritt-readonly-item {
    padding: 0.875rem 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    counter-increment: schritt;
    position: relative;
}

.schritt-readonly-titel {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.schritt-readonly-beschreibung {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── BENUTZER TABLE ───────────────────────────────────────────── */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: flex-start;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--surface-2);
}

.row--inaktiv {
    opacity: 0.55;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.kuerzel {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* ── MT UTILITIES ────────────────────────────────────────────── */
.mt-md {
    margin-top: 1rem;
}

.mt-lg {
    margin-top: 1.5rem;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 1.5rem var(--content-pad);
    color: var(--text-subtle);
    font-size: 0.8125rem;
    border-top: 1px solid var(--border);
}

/* ── LOGIN PAGE ──────────────────────────────────────────────── */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 40%, #0F172A 100%);
    padding: 2rem;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.login-brand {
    text-align: center;
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.login-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin: 0.375rem 0 0;
}

.login-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
}

.login-card .form-group {
    margin-bottom: 1rem;
}

.login-card .form-label {
    color: rgba(255, 255, 255, 0.75);
}

.login-card .form-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.login-card .form-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.login-card .form-input:focus {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.12);
}

.login-card .input-icon {
    color: rgba(255, 255, 255, 0.4);
}

.login-hint {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
}

.login-footer-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
        max-height: 100px;
    }

    to {
        opacity: 0;
        transform: scale(0.95);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

.schritt-item.removing {
    animation: fadeOut 0.25s ease forwards;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .prozess-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col-layout {
        grid-template-columns: 1fr;
    }

    .card--sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --content-pad: 1rem;
    }

    .navbar-links {
        display: none;
    }

    .user-name {
        display: none;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-banner {
        padding: 2rem 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .prozess-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Version Diff Styles --- */
.schritt-readonly-item--neu {
    border-left: 4px solid var(--success) !important;
    background-color: rgba(16, 185, 129, 0.05);
    /* Greenish tint */
}

.schritt-readonly-item--geaendert {
    border-left: 4px solid var(--warning) !important;
    background-color: rgba(245, 158, 11, 0.05);
    /* Yellowish tint */
}

.diff-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.diff-tag--neu {
    background: var(--success);
    color: white;
}

.diff-tag--geaendert {
    background: var(--warning);
    color: white;
}

.diff-info-deleted {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 8px;
    color: var(--danger);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Priority Change Highlights */
.version-prio-change {
    padding: 0.75rem 1.5rem;
    background: rgba(245, 158, 11, 0.03);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.prio-old {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

.prio-new {
    color: var(--text);
}

.diff-tag--prio {
    background: var(--warning);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── KANBAN BOARD ────────────────────────────────────────────── */
.kanban-board-wrapper {
    margin: 1.5rem calc(var(--content-pad) * -1) 0;
    padding: 0 var(--content-pad) 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kanban-board {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    min-width: min-content;
}

.kanban-column {
    flex: 0 0 300px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px);
    transition: background var(--transition);
}

.kanban-column--done {
    background: rgba(16, 185, 129, 0.035);
    border-style: dashed;
}

.kanban-column-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
    border-radius: var(--radius) var(--radius) 0 0;
}

.column-title {
    font-weight: 700;
    font-size: 0.875rem;
    flex: 1;
    color: var(--text);
}

.column-count {
    background: var(--border-strong);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 100px;
    font-weight: 700;
}

.column-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-prio-1 {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.dot-prio-2 {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.dot-prio-3 {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.dot-no-prio {
    background: var(--text-subtle);
}

.dot-done {
    background: var(--primary);
}

.kanban-cards {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.kanban-empty-hint {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.8rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    margin-top: auto;
}

.kanban-card {
    cursor: grab;
    transition: transform var(--transition), box-shadow var(--transition);
    user-select: none;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.kanban-ghost {
    opacity: 0.3;
    background: var(--primary-glow) !important;
    border: 2px dashed var(--primary) !important;
}

.version-badge-small {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Scrollbar für Kanban Spalten */
.kanban-cards::-webkit-scrollbar {
    width: 4px;
}

.kanban-cards::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-cards::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

/* Responsivität */
@media (max-width: 768px) {
    .kanban-column {
        flex: 0 0 280px;
    }
}