
:root {
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.07), 0 1px 2px -1px rgb(0 0 0 / 0.07);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.3rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition-fast: all 0.2s ease-in-out;
    --transition-normal: all 0.3s ease-in-out;

    --status-planned-color: #3b82f6;
    /* blue */
    --status-progress-color: #f59e0b;
    /* amber */
    --status-delayed-color: #ef4444;
    /* red */
    --status-completed-color: #22c55e;
    /* green */
    --status-waiting-color: #64748b;
    /* slate */
}

/* --- THEMES (Simplified) --- */
body[data-theme="standard"] {
    --background-light: #f8fafc;
    --background-content: #ffffff;
    --background-content-rgb: 255, 255, 255;
    --sidebar-bg: #111827;
    --sidebar-hover-bg: #1f2937;
    --text-light: #f9fafb;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e5e7eb;
    --table-row-hover-bg: #f9fafb;
    --table-details-bg: #f1f5f9;
    --primary-color: #4f46e5;
    --primary-color-rgb: 79, 70, 229;
    --primary-hover: #4338ca;
}

body[data-theme="dark"] {
    --background-light: #111827;
    --background-content: #1f2937;
    --background-content-rgb: 31, 41, 55;
    --sidebar-bg: #0f172a;
    --sidebar-hover-bg: #334155;
    --text-light: #f1f5f9;
    --text-dark: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --table-row-hover-bg: #334155;
    --table-details-bg: #111827;
    --primary-color: #6366f1;
    --primary-color-rgb: 99, 102, 241;
    --primary-hover: #4f46e5;
}

body[data-theme="industrial"] {
    --background-light: #d4d4d4;
    --background-content: #e5e5e5;
    --background-content-rgb: 229, 229, 229;
    --sidebar-bg: #262626;
    --sidebar-hover-bg: #404040;
    --text-light: #f5f5f5;
    --text-dark: #171717;
    --text-muted: #525252;
    --border-color: #a3a3a3;
    --table-row-hover-bg: #cccccc;
    --table-details-bg: #d4d4d4;
    --primary-color: #f97316;
    --primary-color-rgb: 249, 115, 22;
    --primary-hover: #ea580c;
}

body[data-theme="midnight"] {
    --background-color: #0a0a0a;
    --background-light: #1a1a1a;
    --background-content: #111111;
    --background-content-rgb: 17, 17, 17;
    --sidebar-bg: #0f0f0f;
    --sidebar-hover-bg: #2a2a2a;
    --text-color: #ffffff;
    --text-light: #ffffff;
    --text-dark: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --table-row-hover-bg: #1f1f1f;
    --table-details-bg: #1a1a1a;
    --primary-color: #3b82f6;
    --primary-color-rgb: 59, 130, 246;
    --primary-hover: #2563eb;
}

body[data-theme="cyberpunk"] {
    --background-color: #0d001a;
    --background-light: #1a0033;
    --background-content: #0f0020;
    --background-content-rgb: 15, 0, 32;
    --sidebar-bg: #150028;
    --sidebar-hover-bg: #2a0040;
    --text-color: #00ffff;
    --text-light: #00ffff;
    --text-dark: #00ffff;
    --text-muted: #ff0080;
    --border-color: #330066;
    --table-row-hover-bg: #200035;
    --table-details-bg: #1a0033;
    --primary-color: #ff0080;
    --primary-color-rgb: 255, 0, 128;
    --primary-hover: #cc0066;
}

body[data-theme="matrix"] {
    --background-color: #000000;
    --background-light: #001100;
    --background-content: #000800;
    --background-content-rgb: 0, 8, 0;
    --sidebar-bg: #001a00;
    --sidebar-hover-bg: #002200;
    --text-color: #00ff41;
    --text-light: #00ff41;
    --text-dark: #00ff41;
    --text-muted: #008020;
    --border-color: #003300;
    --table-row-hover-bg: #001a00;
    --table-details-bg: #001100;
    --primary-color: #00ff41;
    --primary-color-rgb: 0, 255, 65;
    --primary-hover: #00cc33;
}

body[data-theme="dracula"] {
    --background-color: #282a36;
    --background-light: #44475a;
    --background-content: #2f3349;
    --background-content-rgb: 47, 51, 73;
    --sidebar-bg: #21222c;
    --sidebar-hover-bg: #6272a4;
    --text-color: #f8f8f2;
    --text-light: #f8f8f2;
    --text-dark: #f8f8f2;
    --text-muted: #6272a4;
    --border-color: #6272a4;
    --table-row-hover-bg: #44475a;
    --table-details-bg: #44475a;
    --primary-color: #ff79c6;
    --primary-color-rgb: 255, 121, 198;
    --primary-hover: #ff5ac6;
}

body[data-theme="nord"] {
    --background-color: #2e3440;
    --background-light: #3b4252;
    --background-content: #434c5e;
    --background-content-rgb: 67, 76, 94;
    --sidebar-bg: #2e3440;
    --sidebar-hover-bg: #4c566a;
    --text-color: #eceff4;
    --text-light: #eceff4;
    --text-dark: #eceff4;
    --text-muted: #d8dee9;
    --border-color: #4c566a;
    --table-row-hover-bg: #3b4252;
    --table-details-bg: #3b4252;
    --primary-color: #88c0d0;
    --primary-color-rgb: 136, 192, 208;
    --primary-hover: #81a1c1;
}

body[data-theme="synthwave"] {
    --background-color: #1a0033;
    --background-light: #330066;
    --background-content: #240040;
    --background-content-rgb: 36, 0, 64;
    --sidebar-bg: #0f001a;
    --sidebar-hover-bg: #4d0080;
    --text-color: #ff00ff;
    --text-light: #ff00ff;
    --text-dark: #ff00ff;
    --text-muted: #cc00cc;
    --border-color: #660099;
    --table-row-hover-bg: #330066;
    --table-details-bg: #330066;
    --primary-color: #ff006e;
    --primary-color-rgb: 255, 0, 110;
    --primary-hover: #cc0055;
}

body[data-theme="terminal"] {
    --background-color: #000000;
    --background-light: #1a1100;
    --background-content: #0f0800;
    --background-content-rgb: 15, 8, 0;
    --sidebar-bg: #0a0500;
    --sidebar-hover-bg: #332200;
    --text-color: #ffb000;
    --text-light: #ffb000;
    --text-dark: #ffb000;
    --text-muted: #cc8800;
    --border-color: #332200;
    --table-row-hover-bg: #1a1100;
    --table-details-bg: #1a1100;
    --primary-color: #ffb000;
    --primary-color-rgb: 255, 176, 0;
    --primary-hover: #cc8800;
}

body[data-theme="high-contrast"] {
    --background-color: #000000;
    --background-light: #333333;
    --background-content: #111111;
    --background-content-rgb: 17, 17, 17;
    --sidebar-bg: #000000;
    --sidebar-hover-bg: #555555;
    --text-color: #ffffff;
    --text-light: #ffffff;
    --text-dark: #ffffff;
    --text-muted: #cccccc;
    --border-color: #ffffff;
    --table-row-hover-bg: #333333;
    --table-details-bg: #333333;
    --primary-color: #ffff00;
    --primary-color-rgb: 255, 255, 0;
    --primary-hover: #cccc00;
}

body[data-theme="sepia"] {
    --background-color: #f4f1e8;
    --background-light: #e8dcc0;
    --background-content: #ffffff;
    --background-content-rgb: 255, 255, 255;
    --sidebar-bg: #ede0c8;
    --sidebar-hover-bg: #d7ccc8;
    --text-color: #3e2723;
    --text-light: #3e2723;
    --text-dark: #3e2723;
    --text-muted: #5d4037;
    --border-color: #d7ccc8;
    --table-row-hover-bg: #f0f0f0;
    --table-details-bg: #e8dcc0;
    --primary-color: #8b4513;
    --primary-color-rgb: 139, 69, 19;
    --primary-hover: #6d3410;
}

body[data-theme="professional"] {
    --background-color: #1f2937;
    --background-light: #374151;
    --background-content: #2d3748;
    --background-content-rgb: 45, 55, 72;
    --sidebar-bg: #1a202c;
    --sidebar-hover-bg: #2d3748;
    --text-color: #f7fafc;
    --text-light: #f7fafc;
    --text-dark: #f7fafc;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --table-row-hover-bg: #2d3748;
    --table-details-bg: #374151;
    --primary-color: #4f46e5;
    --primary-color-rgb: 79, 70, 229;
    --primary-hover: #4338ca;
    --status-progress-color: #3b82f6;
    --status-completed-color: #10b981;
    --status-delayed-color: #ef4444;
    --status-planned-color: #6b7280;
    --status-onhold-color: #f59e0b;
}

body[data-theme="corporate"] {
    --background-color: #0f172a;
    --background-light: #1e293b;
    --background-content: #334155;
    --background-content-rgb: 51, 65, 85;
    --sidebar-bg: #0c1220;
    --sidebar-hover-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-light: #f1f5f9;
    --text-dark: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --table-row-hover-bg: #1e293b;
    --table-details-bg: #1e293b;
    --primary-color: #0ea5e9;
    --primary-color-rgb: 14, 165, 233;
    --primary-hover: #0284c7;
    --status-progress-color: #0ea5e9;
    --status-completed-color: #22c55e;
    --status-delayed-color: #ef4444;
    --status-planned-color: #64748b;
    --status-onhold-color: #f59e0b;
}

/* --- GLOBAL STYLES --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    display: flex;
    height: 100vh;
    overflow: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.resizing {
    cursor: col-resize;
    user-select: none;
}

#root {
    display: flex;
    width: 100%;
    height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    transition: var(--transition-fast);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background-content);
    color: var(--text-dark);
    width: 100%;
    transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

/* --- AUTHENTICATION --- */
.auth-container {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background-color: var(--background-light);
}

.auth-form {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background-color: var(--background-content);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-svg {
    color: var(--primary-color);
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-size: 1.75rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .button-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

.auth-error {
    color: var(--status-delayed-color);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* --- LAYOUT --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--border-color);
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

/* --- SIDEBAR --- */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

body[data-theme="standard"] .sidebar-header,
body[data-theme="dark"] .sidebar-header {
    border-bottom: 1px solid #334155;
}


.sidebar-header .logo-svg {
    color: var(--primary-color);
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.sidebar-nav .nav-item a:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--text-light);
}

.sidebar-nav .nav-item a.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

body[data-theme="minimalist"] .sidebar-nav .nav-item a.active {
    color: white;
}


.sidebar-nav .nav-item a.active svg {
    stroke: var(--text-light);
}

/* --- HEADER --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--background-content);
    border-bottom: 1px solid var(--border-color);
}

.header-placeholder {
    flex: 1;
}

.search-bar-wrapper {
    position: relative;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--background-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    width: 320px;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}


.search-bar svg {
    color: var(--text-muted);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    padding: 0;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    margin-top: 0.5rem;
}

.autocomplete-suggestions li {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.autocomplete-suggestions li:hover {
    background-color: var(--background-light);
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions button {
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: 50%;
}

.header-actions button:hover {
    color: var(--text-dark);
    background-color: var(--background-light);
}

.profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile .user-info {
    text-align: right;
}

.profile .user-info .user-name {
    font-weight: 600;
}

.profile .user-info .user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile .logout-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.profile .logout-button:hover {
    color: var(--primary-color);
}

/* --- CONTENT --- */
.content-header {
    margin-bottom: 2rem;
}

.content-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.page-section {
    background-color: var(--background-content);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 82px;
}

.section-title {
    font-size: 1.25rem;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

button.import-button,
button.create-button,
button.button-secondary,
button.button-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

button.create-button,
button.button-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

body[data-theme="minimalist"] .create-button,
body[data-theme="minimalist"] .button-primary {
    color: white;
}

button.create-button:hover,
button.button-primary:hover {
    background-color: var(--primary-hover);
}

button.button-primary:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}


button.import-button,
button.button-secondary {
    background-color: var(--background-content);
    border-color: var(--border-color);
    color: var(--text-dark);
}

button.import-button:hover,
button.button-secondary:hover {
    background-color: var(--background-light);
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 0.5rem;
}

/* --- DASHBOARD --- */
.dashboard-overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-container,
.chart-section {
    background-color: var(--background-content);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.kpi-icon.icon-active {
    background-color: var(--status-progress-color);
    color: white;
}

.kpi-icon.icon-delayed {
    background-color: var(--status-delayed-color);
    color: white;
}

.kpi-icon.icon-upcoming {
    background-color: var(--status-planned-color);
    color: white;
}

.kpi-icon.icon-completed {
    background-color: var(--status-completed-color);
    color: white;
}

.kpi-icon.icon-empty {
    background-color: var(--status-waiting-color);
    color: white;
}


.kpi-info .kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.kpi-info .kpi-title {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.charts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    flex: 1;
}

.chart-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-chart-background {
    stroke: var(--border-color);
}

.chart-center-text .chart-center-value {
    font-size: 2rem;
    font-weight: 700;
    fill: var(--text-dark);
}

.chart-center-text .chart-center-label {
    font-size: 0.875rem;
    fill: var(--text-muted);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-color-box {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-label {
    flex: 1;
    color: var(--text-muted);
}

.legend-value {
    font-weight: 600;
}

/* --- TABLE --- */
.table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.orders-table th,
.orders-table td {
    padding: 1.1rem 1.5rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-table thead {
    background-color: var(--background-light);
    border-bottom: 2px solid var(--border-color);
}

.orders-table th {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.orders-table th.sortable {
    cursor: pointer;
}

.orders-table th.sortable:hover {
    color: var(--text-dark);
}

.orders-table th .sort-icon {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.orders-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.orders-table tbody tr:last-child {
    border-bottom: none;
}

.orders-table tbody tr:hover {
    background-color: var(--table-row-hover-bg);
}

.orders-table tbody tr.expandable-row {
    cursor: pointer;
}

.orders-table tbody tr.expandable-row[draggable="true"] {
    cursor: grab;
}

.orders-table tbody tr.dragging {
    opacity: 0.4;
    background: var(--table-details-bg);
}

.orders-table tbody tr.drag-over {
    box-shadow: inset 0 2px 0 var(--primary-color);
}

.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 1;
}

/* --- Row Priority Highlighting --- */
.orders-table tbody tr.priority-hoch {
    box-shadow: inset 4px 0 0 0 var(--status-delayed-color);
}

.orders-table tbody tr.priority-hoch:hover {
    background-color: rgba(239, 68, 68, 0.05);
}

.orders-table tbody tr.priority-normal {
    box-shadow: inset 4px 0 0 0 var(--status-progress-color);
}

.orders-table tbody tr.priority-normal:hover {
    background-color: rgba(245, 158, 11, 0.05);
}

.orders-table tbody tr.priority-niedrig {
    box-shadow: inset 4px 0 0 0 var(--status-planned-color);
}

.orders-table tbody tr.priority-niedrig:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.priority-badge-hoch {
    background-color: var(--status-delayed-color);
}

.priority-badge-normal {
    background-color: var(--status-progress-color);
}

.priority-badge-niedrig {
    background-color: var(--status-planned-color);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: white;
    display: inline-block;
}

.status-badge.geplant,
.status-badge.planned {
    background-color: var(--status-planned-color);
}

.status-badge.in-bearbeitung,
.status-badge.progress {
    background-color: var(--status-progress-color);
}

.status-badge.verspätet,
.status-badge.delayed {
    background-color: var(--status-delayed-color);
}

.status-badge.abgeschlossen,
.status-badge.completed {
    background-color: var(--status-completed-color);
}

.status-badge.on-hold,
.status-badge.waiting {
    background-color: var(--status-waiting-color);
}

.progress-cell-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 22px;
    background-color: var(--background-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-sm);
    transition: width 0.4s ease, background-color 0.4s ease;
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.component-progress-container {
    display: flex;
    gap: 3px;
    height: 8px;
    width: 100%;
}

.component-indicator {
    flex: 1;
    min-width: 4px;
    height: 100%;
    border-radius: 2px;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.component-indicator.completed {
    background-color: var(--status-completed-color);
    border-color: var(--status-completed-color);
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group .avatar-small {
    margin-left: -8px;
    border: 2px solid var(--background-content);
}

.avatar-group .avatar-small:first-child {
    margin-left: 0;
}

.action-cell {
    position: relative;
}

.action-button {
    padding: 0.5rem;
    border-radius: 50%;
}

.action-button:hover {
    background-color: var(--background-light);
}

.action-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 1.5rem;
    background-color: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    width: 200px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.action-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    text-align: left;
    font-size: 0.875rem;
}

.action-menu button:hover {
    background-color: var(--background-light);
}

.action-menu button svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.action-menu .action-menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.action-menu .delete-action {
    color: var(--status-delayed-color);
}

.action-menu .delete-action:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.action-menu .delete-action svg {
    color: var(--status-delayed-color);
}

.details-row td {
    padding: 0;
}

.order-details-container {
    background-color: var(--table-details-bg);
}

/* --- VISUAL PROCESS TIMELINE --- */
.phases-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem 1.5rem;
}

.phase-step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.phase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.phase-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--border-color);
    background-color: var(--background-content);
    color: var(--text-muted);
    transition: var(--transition-normal);
    z-index: 2;
    position: relative;
}

.phase-step-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.phase-connector {
    height: 4px;
    background-color: var(--border-color);
    flex-grow: 1;
    margin: 0 -1px;
    position: relative;
    top: 22px;
    transition: var(--transition-normal);
    z-index: 1;
}

.phase-checkbox {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.phase-checkbox:disabled {
    cursor: not-allowed;
}

/* Timeline states */
.phase-step.completed .phase-icon-container {
    background-color: var(--status-completed-color);
    border-color: var(--status-completed-color);
    color: white;
}

.phase-step.completed .phase-step-label {
    color: var(--text-dark);
}

.phase-connector.completed {
    background-color: var(--status-completed-color);
}

.phase-step.current .phase-icon-container {
    border-color: var(--primary-color);
    background-color: var(--background-content);
    color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.2);
}

.phase-step.current .phase-step-label {
    color: var(--primary-color);
    font-weight: 700;
}

/* Subtasks for 'Herstellung' - Improved Layout */
.phase-subtasks-container {
    margin-top: 1rem;
    width: 100%;
    max-width: 500px;
    background-color: var(--background-content);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.subtask-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    border-radius: var(--radius-sm);
}

.subtask-toggle:hover {
    background-color: var(--background-light);
}

.subtask-list {
    list-style: none;
}

.subtask-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.25rem 1.5rem;
    padding: 0.75rem;
}

.subtask-item label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-align: left;
    transition: background-color 0.2s ease;
}

.subtask-item label:hover {
    background-color: var(--background-light);
}

.subtask-item .checkbox-custom {
    grid-column: 1;
}

.subtask-item .subtask-text {
    grid-column: 2;
    word-break: break-word;
}

.no-subtasks {
    grid-column: 1 / -1;
    font-style: italic;
    color: var(--text-muted);
    padding: 1rem;
    text-align: center;
}

/* Phase Handover Button */
.phase-handover-action {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    text-align: center;
}

/* Style for handover buttons directly in the timeline */
.phase-handover-action.timeline {
    border-top: none;
    padding: 0;
    margin-top: 1rem;
}

.phase-handover-action .button-primary {
    width: auto;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* Checkbox custom style */
input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

input[type="checkbox"]:checked+.checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:indeterminate+.checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:indeterminate+.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    width: 8px;
    height: 2px;
    background-color: white;
}


.process-completion-action {
    padding: 1.5rem;
    text-align: center;
}

.delivered-button {
    font-size: 1.1rem !important;
    padding: 1rem 2.5rem !important;
    gap: 1rem !important;
}


/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: grid;
    place-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--background-content);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modal-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.close-button {
    padding: 0.5rem;
    border-radius: 50%;
}

.close-button:hover {
    background-color: var(--background-light);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--background-light);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.delete-action {
    background-color: var(--status-delayed-color) !important;
    border-color: var(--status-delayed-color) !important;
    color: white !important;
}

.delete-action:hover {
    opacity: 0.85;
}


/* Form specific styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Subtask/Component editing in modal */
.subtask-input-group {
    display: flex;
    gap: 0.5rem;
}

.subtask-input-group input {
    flex: 1;
}

.subtask-input-group button {
    padding: 0 1rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.subtask-input-group button:hover {
    background-color: var(--border-color);
}

.subtask-edit-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.subtask-edit-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-light);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.subtask-edit-list li button {
    color: var(--text-muted);
}

.subtask-edit-list li button:hover {
    color: var(--status-delayed-color);
}

.checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.checkbox-list.multi-column {
    column-count: 3;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.checkbox-label-text {
    font-size: 0.875rem;
}

/* Modal animations */
@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- PRODUCT CATALOG --- */
.action-cell-multi {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-icon-button {
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--text-muted);
}

.action-icon-button:hover {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.action-icon-button.delete-action:hover {
    color: var(--status-delayed-color);
}

.group-header td {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

/* --- PRIMER INVENTORY --- */
.toolbar-filter select {
    width: 250px;
}

.filter-tabs {
    display: flex;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.85rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-muted);
}

.filter-tab:hover {
    color: var(--text-dark);
}

.filter-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.filter-tab-group {
    display: flex;
    gap: 0.5rem;
    border-left: 1px solid var(--border-color);
    margin-left: 0.5rem;
    padding-left: 1rem;
}

tr.critical-stock {
    background-color: rgba(239, 68, 68, 0.05);
    box-shadow: inset 4px 0 0 0 var(--status-delayed-color);
}

.critical-indicator-cell {
    position: relative;
}

.critical-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--status-delayed-color);
}

.progress-bar-critical-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(239, 68, 68, 0.2);
}

.progress-bar-critical-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--status-delayed-color);
    opacity: 0.5;
    transform: translateX(-1px);
}

.button-small {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.button-zugabe {
    background-color: var(--status-completed-color);
    color: white;
}

.button-entnahme {
    background-color: var(--status-progress-color);
    color: white;
}

.primer-details-container {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: flex-start;
}

.volume-chart-container,
.logbook-container {
    display: flex;
    flex-direction: column;
}

.logbook-table-wrapper {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.logbook-table {
    width: 100%;
    border-collapse: collapse;
}

.logbook-table th,
.logbook-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
}

.logbook-table thead {
    position: sticky;
    top: 0;
    background-color: var(--background-light);
}

.logbook-table tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.log-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.log-action svg {
    width: 16px;
    height: 16px;
}

.log-add {
    color: var(--status-completed-color);
}

.log-remove {
    color: var(--status-progress-color);
}

.log-create {
    color: var(--status-planned-color);
}

.log-edit {
    color: var(--text-muted);
}

.log-change {
    font-weight: 600;
}

.reason-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reason-type-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reason-type-selector input[type="radio"] {
    display: inline-block;
}


/* --- SETTINGS PAGE --- */
.theme-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.theme-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

.theme-card.active {
    border-color: var(--primary-color);
}

.theme-preview {
    height: 120px;
    padding: 1rem;
}

.preview-header {
    height: 20%;
    background-color: var(--sidebar-bg);
    border-radius: var(--radius-sm);
}

.preview-body {
    height: 65%;
    background-color: var(--background-content);
    margin-top: 10%;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.preview-line-1 {
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 4px;
    width: 60%;
}

.preview-line-2 {
    height: 10px;
    background-color: var(--border-color);
    border-radius: 4px;
    width: 80%;
    margin-top: 10px;
}

.theme-info {
    padding: 1rem;
    background-color: var(--background-light);
}

.theme-info h4 {
    font-size: 1rem;
}

.theme-info p {
    font-size: 0.8rem;
}

.settings-panel {
    padding: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item-text h4 {
    font-size: 1rem;
}

.setting-item-text p {
    font-size: 0.875rem;
    max-width: 500px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--primary-color);
}

input:checked+.toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}


.setting-item-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.recipient-input-group {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    max-width: 500px;
}

.recipient-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
}

.recipient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--background-light);
    border-radius: var(--radius-sm);
}

.protected-setting-wrapper {
    position: relative;
}

.protected-setting-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--background-content-rgb), 0.8);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    text-align: left;
}


/* --- TEAM PAGE --- */
.view-switcher button {
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.view-switcher button.active {
    background-color: var(--primary-color);
    color: white;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.team-card {
    background-color: var(--background-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.card-header .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.card-header .member-name {
    font-size: 1.1rem;
}

.card-header .member-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-header-actions {
    margin-left: auto;
}

.status-indicator {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.card-body {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    flex: 1;
}

.workload-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.workload-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.workload-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.workload-bar-container {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.workload-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.card-footer {
    padding: 1rem;
    display: flex;
}

.card-footer button {
    width: 100%;
}

.team-list-table td,
.team-list-table th {
    padding: 0.75rem 1.5rem;
}

/* Custom Select Dropdown */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background-content);
    text-align: left;
}

.expand-icon {
    transition: transform 0.2s ease;
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 0.25rem;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
}

.custom-select-item:hover {
    background-color: var(--background-light);
}

/* Notification Dropdown */
.notification-container {
    position: relative;
}

.notification-button {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--status-delayed-color);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 2px solid var(--background-content);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 350px;
    background-color: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: var(--background-light);
}

.notification-item-icon {
    color: var(--status-delayed-color);
}

.notification-item-content strong {
    font-size: 0.9rem;
}

.notification-item-content p {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.notification-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.activity-section {
    margin-bottom: 2rem;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 20px;
    opacity: 0.7;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/*
 --- PRODUCT COMPONENTS STYLES --- */
.components-list {
    font-size: 0.875rem;
}

.components-list details {
    cursor: pointer;
}

.components-list summary {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.25rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.components-list summary::-webkit-details-marker {
    display: none;
}

.components-list summary::before {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.components-list details[open] summary::before {
    transform: rotate(90deg);
}

.component-items {
    list-style: none;
    padding: 0.5rem 0 0 1rem;
    margin: 0;
    border-left: 2px solid var(--border-color);
    margin-left: 0.5rem;
}

.component-items li {
    padding: 0.25rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    position: relative;
}

.component-items li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: -0.75rem;
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
}

/* -
-- TOOLS SECTION --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.tool-card {
    background: linear-gradient(135deg, var(--background-content) 0%, rgba(var(--primary-color-rgb), 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.6));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.tool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--primary-color-rgb), 0.2));
    border-radius: 20px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.2), rgba(var(--primary-color-rgb), 0.3));
}

.tool-card-icon svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tool-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    letter-spacing: -0.025em;
}

.tool-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- CALCULATOR COMPONENTS --- */
.calculator-container {
    max-width: 650px;
    margin: 2.5rem auto 0;
    background: linear-gradient(135deg, var(--background-content) 0%, rgba(var(--primary-color-rgb), 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
}

.calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), rgba(var(--primary-color-rgb), 0.6));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.calculator-input {
    margin-bottom: 2rem;
}

.calculator-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.calculator-input input {
    font-size: 1.125rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-content);
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.calculator-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.calculator-result {
    text-align: center;
    margin-top: 2rem;
}

.calculator-result h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.result-display {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.08), rgba(var(--primary-color-rgb), 0.15));
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid rgba(var(--primary-color-rgb), 0.25);
    text-align: center;
    letter-spacing: -0.02em;
    box-shadow: inset 0 2px 4px rgba(var(--primary-color-rgb), 0.1);
    position: relative;
    overflow: hidden;
}

.result-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* --- WORK HOURS CALCULATOR --- */
.time-entries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time-entry {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-entry label {
    font-weight: 600;
    color: var(--text-dark);
}

.time-entry-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.time-entry-input input {
    flex: 1;
    font-size: 1rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background-content);
    color: var(--text-dark);
}

.time-entry-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.remove-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    transition: var(--transition-fast);
}

.remove-button:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

.add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border: 2px dashed rgba(var(--primary-color-rgb), 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.add-button:hover {
    background-color: rgba(var(--primary-color-rgb), 0.2);
    border-color: var(--primary-color);
}

.add-button svg {
    width: 16px;
    height: 16px;
}

/* --- BACK BUTTON --- */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--background-content), rgba(var(--primary-color-rgb), 0.02));
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xs);
}

.back-button:hover {
    background: linear-gradient(135deg, var(--background-light), rgba(var(--primary-color-rgb), 0.05));
    color: var(--primary-color);
    border-color: rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .calculator-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .result-display {
        font-size: 1.5rem;
        padding: 1rem;
    }

    .time-entry-input {
        flex-direction: column;
        align-items: stretch;
    }

    .remove-button {
        align-self: flex-end;
        width: auto;
        padding: 0.5rem 1rem;
        border-radius: var(--radius-md);
    }
}

/* --- THEME-SPECIFIC ADJUSTMENTS --- */
body[data-theme="dark"] .calculator-container,
body[data-theme="dark"] .tool-card {
    border-color: #374151;
}

body[data-theme="minimalist"] .tool-card:hover {
    border-color: var(--text-dark);
}

body[data-theme="minimalist"] .tool-card-icon {
    background-color: var(--background-light);
    color: var(--text-dark);
}

body[data-theme="industrial"] .result-display {
    background-color: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

body[data-theme="oceanic"] .result-display {
    background-color: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

/*
 --- SIMPLIFIED WORK HOURS CALCULATOR --- */
.simple-input-section {
    margin-bottom: 2rem;
}

.simple-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.simple-input-section input {
    width: 100%;
    font-size: 1.25rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-content);
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.simple-input-section input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.entries-list {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(var(--primary-color-rgb), 0.03);
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.entries-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

.clear-button {
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.clear-button:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.entry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: var(--shadow-xs);
}

.entry-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    transition: var(--transition-fast);
    margin-left: 0.5rem;
}

.entry-remove:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.result-subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- WORK DAYS CALCULATOR --- */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.date-input-group {
    display: flex;
    flex-direction: column;
}

.date-input-group label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 1rem;
}

.date-input-group input[type="date"] {
    font-size: 1.125rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-content);
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.date-input-group input[type="date"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* --- RESPONSIVE UPDATES --- */
@media (max-width: 768px) {
    .date-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .entries-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .entry-item {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .entries-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .clear-button {
        align-self: flex-end;
        width: fit-content;
    }
}

/* --- THEME SPECIFIC ADJUSTMENTS --- */
body[data-theme="dark"] .entries-list {
    background: rgba(var(--primary-color-rgb), 0.05);
    border-color: rgba(var(--primary-color-rgb), 0.2);
}

/* Enhanced Theme Preview Styles */
.theme-preview {
    height: 120px !important;
    padding: 0 !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.preview-header {
    height: 30px !important;
    width: 100% !important;
    position: relative !important;
    border-radius: 0 !important;
}

.preview-body {
    height: 90px !important;
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    border-radius: 0 !important;
}

.preview-line-1 { 
    height: 8px !important; 
    border-radius: 4px !important; 
    width: 70% !important; 
}

.preview-line-2 { 
    height: 6px !important; 
    border-radius: 3px !important; 
    width: 50% !important; 
    margin-top: 0 !important;
}

.preview-accent {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
}

/*
 --- DELIVERY INFO STYLES --- */
.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.delivery-date {
    font-weight: 600;
    color: var(--text-dark);
}

.delivery-countdown {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    text-align: center;
}

.delivery-countdown.overdue {
    color: #dc2626;
    background-color: rgba(220, 38, 38, 0.1);
    font-weight: 600;
}

/* --- BATCH NUMBER DUPLICATE WARNING --- */
.batch-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
    border: 3px solid #f59e0b;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    max-width: 450px;
    width: 90%;
    animation: batchWarningSlideIn 0.3s ease-out;
}

@keyframes batchWarningSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.batch-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.batch-warning-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.batch-warning-header svg {
    width: 28px;
    height: 28px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.batch-warning h3 {
    margin: 0;
    color: white;
    font-size: 1.375rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.batch-warning p {
    margin: 1rem 0;
    color: #374151;
    line-height: 1.6;
    font-size: 1rem;
}

.batch-warning-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.batch-warning-actions button {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.batch-warning-cancel {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    border: 2px solid #d1d5db;
}

.batch-warning-cancel:hover {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.batch-warning-continue {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.batch-warning-continue:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.4);
}

/* --- DARK THEME ADJUSTMENTS --- */
body[data-theme="dark"] .batch-warning {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: #f59e0b;
}

body[data-theme="dark"] .batch-warning p {
    color: #d1d5db;
}/* -
-- DELIVERY INFO STYLES --- */
.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.delivery-date {
    font-weight: 600;
    color: var(--text-dark);
}

.delivery-countdown {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    font-style: italic;
}

.delivery-countdown::before {
    content: "(";
}

.delivery-countdown::after {
    content: ")";
}

.delivery-countdown.overdue {
    color: #dc2626;
    font-weight: 600;
}/* -
-- INLINE FIELD ERROR STYLES --- */
.field-error {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #f87171;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fieldErrorSlideIn 0.3s ease-out;
}

.field-error::before {
    content: "⚠️";
    font-size: 1rem;
}

@keyframes fieldErrorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input.error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2) !important;
    background-color: #fef2f2;
}

/* --- DARK THEME ADJUSTMENTS --- */
body[data-theme="dark"] .field-error {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: #dc2626;
    color: #fca5a5;
}

body[data-theme="dark"] input.error {
    background-color: #7f1d1d;
    border-color: #dc2626 !important;
}/
* --- USER MANAGEMENT STYLES --- */
.user-management-filters {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--background-content);
    color: var(--text-dark);
    font-size: 0.875rem;
}

.user-stats {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}

.stat-item {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-item strong {
    color: var(--primary-color);
    font-weight: 700;
}

.user-management-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.user-management-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-content);
}

.user-management-table th {
    background: var(--background-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.user-management-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.user-management-table th.sortable:hover {
    background: var(--primary-color);
    color: white;
}

.th-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-management-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.user-management-table tr.user-inactive {
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.02);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-user-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.role-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.role-badge.role-benutzer {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.role-badge.role-gast {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.active {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-indicator.inactive {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.last-login-cell, .created-cell {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.action-button.edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-button.edit:hover {
    background: #3b82f6;
    color: white;
}

.action-button.activate {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.action-button.activate:hover {
    background: #22c55e;
    color: white;
}

.action-button.deactivate {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.action-button.deactivate:hover {
    background: #f59e0b;
    color: white;
}

.action-button.reset {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.action-button.reset:hover {
    background: #8b5cf6;
    color: white;
}

.action-button.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-button.delete:hover {
    background: #ef4444;
    color: white;
}

/* --- RESPONSIVE USER MANAGEMENT --- */
@media (max-width: 1024px) {
    .user-management-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-stats {
        margin-left: 0;
        justify-content: space-between;
    }
    
    .user-management-table th,
    .user-management-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* --- DARK THEME ADJUSTMENTS --- */
body[data-theme="dark"] .user-management-table tr.user-inactive {
    background: rgba(255, 255, 255, 0.02);
}

body[data-theme="dark"] .user-management-filters {
    background: var(--sidebar-bg);
}/*
 --- USER MANAGEMENT STYLES (MATCHING EXISTING DESIGN) --- */
.user-management-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-filters-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
    white-space: nowrap;
}

.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--background-content);
    color: var(--text-dark);
    font-size: 0.875rem;
    min-width: 120px;
}

.user-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.stat-item {
    color: var(--text-muted);
}

.stat-item strong {
    color: var(--text-dark);
    font-weight: 600;
}

.user-management-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.user-management-table th.sortable:hover {
    color: var(--primary-color);
}

.th-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-management-table tr.user-inactive {
    opacity: 0.6;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-user-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.user-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-admin {
    background: #ef4444;
    color: white;
}

.role-badge.role-benutzer {
    background: #3b82f6;
    color: white;
}

.role-badge.role-gast {
    background: #6b7280;
    color: white;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-indicator.active {
    background: #22c55e;
}

.status-indicator.inactive {
    background: #ef4444;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.last-login-cell, .created-cell {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.75rem;
    background: none;
}

.action-button.edit {
    color: var(--text-muted);
}

.action-button.edit:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-button.activate,
.action-button.deactivate {
    color: var(--text-muted);
}

.action-button.activate:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.action-button.deactivate:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.action-button.reset {
    color: var(--text-muted);
}

.action-button.reset:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.action-button.delete {
    color: var(--text-muted);
}

.action-button.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* --- RESPONSIVE USER MANAGEMENT --- */
@media (max-width: 768px) {
    .user-management-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-filters-left {
        justify-content: space-between;
    }
    
    .user-stats {
        justify-content: space-between;
        margin: 0;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .user-actions {
        flex-wrap: wrap;
    }
}/* -
-- ENHANCED USER MANAGEMENT --- */
.user-management-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-info {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.user-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.stat-item {
    color: var(--text-muted);
}

.stat-item strong {
    color: var(--primary-color);
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-user-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.user-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.role-badge.role-benutzer {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.role-badge.role-gast {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.active {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-indicator.inactive {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.created-cell {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.admin-table tr.user-inactive {
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.02);
}

/* --- ENHANCED USER CARDS --- */
.enhanced-user-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-card {
    background: var(--background-content);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-xs);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.user-card.user-inactive {
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.02);
}

.user-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.user-avatar-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.user-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: var(--transition-fast);
}

.user-card:hover .user-avatar-large {
    border-color: var(--primary-color);
}

.user-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--background-content);
}

.user-status-dot.active {
    background: #22c55e;
}

.user-status-dot.inactive {
    background: #ef4444;
}

.user-info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.user-display-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-details-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.user-initials {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-email {
    color: var(--text-muted);
    font-weight: 500;
}

.user-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.user-created,
.user-last-login {
    font-weight: 500;
}

.user-actions-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-content);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.user-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.user-action-btn.edit:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.user-action-btn.activate:hover {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.user-action-btn.deactivate:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.user-action-btn.reset:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.user-action-btn.delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.user-action-btn svg {
    width: 16px;
    height: 16px;
}

/* --- RESPONSIVE USER CARDS --- */
@media (max-width: 768px) {
    .user-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .user-avatar-section {
        align-items: center;
    }
    
    .user-actions-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .user-action-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .user-meta-row {
        flex-direction: row;
        gap: 1rem;
    }
}

/* --- USER TEAM CARDS (MATCHING TEAM LAYOUT) --- */
.user-team-card .member-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-team-card .current-user-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.user-team-card.user-inactive {
    opacity: 0.6;
}

.user-details-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

.user-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.user-card-actions .button-secondary {
    padding: 0.5rem;
    min-width: auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-card-actions .button-secondary svg {
    width: 16px;
    height: 16px;
}

/* Avatar size fix for uploaded images */
.avatar {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover;
    border-radius: 50%;
}

/* Dark theme adjustments */
body[data-theme="dark"] .user-team-card.user-inactive {
    opacity: 0.6;
}
/* Enhanc
ed Theme Preview Styles */
.theme-preview {
    height: 120px !important;
    padding: 0 !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.preview-header {
    height: 30px !important;
    width: 100%;
    position: relative;
    border-radius: 0 !important;
}

.preview-body {
    height: 90px !important;
    padding: 1rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 0 !important;
}

.preview-line-1 { 
    height: 8px !important; 
    border-radius: 4px !important; 
    width: 70% !important; 
}

.preview-line-2 { 
    height: 6px !important; 
    border-radius: 3px !important; 
    width: 50% !important; 
    margin-top: 0 !important;
}

.preview-accent {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.theme-info { 
    padding: 1rem !important; 
    background-color: var(--background-light) !important; 
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
}

.theme-info h4 { 
    font-size: 1rem !important; 
    margin: 0 0 0.25rem 0 !important;
    font-weight: 600 !important;
}

.theme-info p { 
    font-size: 0.8rem !important; 
    margin: 0 !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
}

/* Theme-specific CSS variables for new themes */
[data-theme="midnight"] {
    --primary-color: #3b82f6;
    --primary-color-rgb: 59, 130, 246;
    --background-color: #0a0a0a;
    --background-light: #1a1a1a;
    --background-content: #111111;
    --sidebar-bg: #0f0f0f;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;
}

[data-theme="cyberpunk"] {
    --primary-color: #ff0080;
    --primary-color-rgb: 255, 0, 128;
    --background-color: #0d001a;
    --background-light: #1a0033;
    --background-content: #0f0020;
    --sidebar-bg: #150028;
    --text-color: #00ffff;
    --text-muted: #ff0080;
    --border-color: #330066;
    --status-progress-color: #00ffff;
    --status-completed-color: #ff0080;
    --status-delayed-color: #ff4000;
}

[data-theme="matrix"] {
    --primary-color: #00ff41;
    --primary-color-rgb: 0, 255, 65;
    --background-color: #000000;
    --background-light: #001100;
    --background-content: #000800;
    --sidebar-bg: #001a00;
    --text-color: #00ff41;
    --text-muted: #008020;
    --border-color: #003300;
    --status-progress-color: #00ff41;
    --status-completed-color: #00cc33;
    --status-delayed-color: #ff4000;
}

[data-theme="dracula"] {
    --primary-color: #ff79c6;
    --primary-color-rgb: 255, 121, 198;
    --background-color: #282a36;
    --background-light: #44475a;
    --background-content: #2f3349;
    --sidebar-bg: #21222c;
    --text-color: #f8f8f2;
    --text-muted: #6272a4;
    --border-color: #6272a4;
    --status-progress-color: #8be9fd;
    --status-completed-color: #50fa7b;
    --status-delayed-color: #ff5555;
}

[data-theme="nord"] {
    --primary-color: #88c0d0;
    --primary-color-rgb: 136, 192, 208;
    --background-color: #2e3440;
    --background-light: #3b4252;
    --background-content: #434c5e;
    --sidebar-bg: #2e3440;
    --text-color: #eceff4;
    --text-muted: #d8dee9;
    --border-color: #4c566a;
    --status-progress-color: #81a1c1;
    --status-completed-color: #a3be8c;
    --status-delayed-color: #bf616a;
}

[data-theme="synthwave"] {
    --primary-color: #ff006e;
    --primary-color-rgb: 255, 0, 110;
    --background-color: #1a0033;
    --background-light: #330066;
    --background-content: #240040;
    --sidebar-bg: #0f001a;
    --text-color: #ff00ff;
    --text-muted: #cc00cc;
    --border-color: #660099;
    --status-progress-color: #00ffff;
    --status-completed-color: #ff006e;
    --status-delayed-color: #ff4000;
}

[data-theme="terminal"] {
    --primary-color: #ffb000;
    --primary-color-rgb: 255, 176, 0;
    --background-color: #000000;
    --background-light: #1a1100;
    --background-content: #0f0800;
    --sidebar-bg: #0a0500;
    --text-color: #ffb000;
    --text-muted: #cc8800;
    --border-color: #332200;
    --status-progress-color: #ffb000;
    --status-completed-color: #00ff00;
    --status-delayed-color: #ff4000;
}

[data-theme="high-contrast"] {
    --primary-color: #ffff00;
    --primary-color-rgb: 255, 255, 0;
    --background-color: #000000;
    --background-light: #333333;
    --background-content: #111111;
    --sidebar-bg: #000000;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --border-color: #ffffff;
    --status-progress-color: #00ffff;
    --status-completed-color: #00ff00;
    --status-delayed-color: #ff0000;
}

[data-theme="sepia"] {
    --primary-color: #8b4513;
    --primary-color-rgb: 139, 69, 19;
    --background-color: #f4f1e8;
    --background-light: #e8dcc0;
    --background-content: #ffffff;
    --sidebar-bg: #ede0c8;
    --text-color: #3e2723;
    --text-muted: #5d4037;
    --border-color: #d7ccc8;
    --status-progress-color: #8b4513;
    --status-completed-color: #4e7c07;
    --status-delayed-color: #d84315;
}/* ==
= NEW THEME DEFINITIONS === */
body[data-theme="midnight"] {
    --background-light: #1a1a1a;
    --background-content: #111111;
    --background-content-rgb: 17, 17, 17;
    --sidebar-bg: #0f0f0f;
    --sidebar-hover-bg: #2a2a2a;
    --text-light: #ffffff;
    --text-dark: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --table-row-hover-bg: #1f1f1f;
    --table-details-bg: #1a1a1a;
    --primary-color: #3b82f6;
    --primary-color-rgb: 59, 130, 246;
    --primary-hover: #2563eb;
    --status-progress-color: #3b82f6;
    --status-completed-color: #10b981;
    --status-delayed-color: #ef4444;
    --status-planned-color: #6b7280;
    --status-onhold-color: #f59e0b;
}

body[data-theme="cyberpunk"] {
    --background-light: #1a0033;
    --background-content: #0f0020;
    --background-content-rgb: 15, 0, 32;
    --sidebar-bg: #150028;
    --sidebar-hover-bg: #2a0040;
    --text-light: #00ffff;
    --text-dark: #00ffff;
    --text-muted: #ff0080;
    --border-color: #330066;
    --table-row-hover-bg: #200035;
    --table-details-bg: #1a0033;
    --primary-color: #ff0080;
    --primary-color-rgb: 255, 0, 128;
    --primary-hover: #cc0066;
    --status-progress-color: #00ffff;
    --status-completed-color: #ff0080;
    --status-delayed-color: #ff4000;
    --status-planned-color: #8000ff;
    --status-onhold-color: #ffff00;
}

body[data-theme="matrix"] {
    --background-light: #001100;
    --background-content: #000800;
    --background-content-rgb: 0, 8, 0;
    --sidebar-bg: #001a00;
    --sidebar-hover-bg: #002200;
    --text-light: #00ff41;
    --text-dark: #00ff41;
    --text-muted: #008020;
    --border-color: #003300;
    --table-row-hover-bg: #001a00;
    --table-details-bg: #001100;
    --primary-color: #00ff41;
    --primary-color-rgb: 0, 255, 65;
    --primary-hover: #00cc33;
    --status-progress-color: #00ff41;
    --status-completed-color: #00cc33;
    --status-delayed-color: #ff4000;
    --status-planned-color: #006600;
    --status-onhold-color: #ffff00;
}

body[data-theme="dracula"] {
    --background-light: #44475a;
    --background-content: #2f3349;
    --background-content-rgb: 47, 51, 73;
    --sidebar-bg: #21222c;
    --sidebar-hover-bg: #6272a4;
    --text-light: #f8f8f2;
    --text-dark: #f8f8f2;
    --text-muted: #6272a4;
    --border-color: #6272a4;
    --table-row-hover-bg: #44475a;
    --table-details-bg: #44475a;
    --primary-color: #ff79c6;
    --primary-color-rgb: 255, 121, 198;
    --primary-hover: #ff5ac6;
    --status-progress-color: #8be9fd;
    --status-completed-color: #50fa7b;
    --status-delayed-color: #ff5555;
    --status-planned-color: #6272a4;
    --status-onhold-color: #f1fa8c;
}

body[data-theme="nord"] {
    --background-light: #3b4252;
    --background-content: #434c5e;
    --background-content-rgb: 67, 76, 94;
    --sidebar-bg: #2e3440;
    --sidebar-hover-bg: #4c566a;
    --text-light: #eceff4;
    --text-dark: #eceff4;
    --text-muted: #d8dee9;
    --border-color: #4c566a;
    --table-row-hover-bg: #3b4252;
    --table-details-bg: #3b4252;
    --primary-color: #88c0d0;
    --primary-color-rgb: 136, 192, 208;
    --primary-hover: #81a1c1;
    --status-progress-color: #81a1c1;
    --status-completed-color: #a3be8c;
    --status-delayed-color: #bf616a;
    --status-planned-color: #5e81ac;
    --status-onhold-color: #ebcb8b;
}

body[data-theme="synthwave"] {
    --background-light: #330066;
    --background-content: #240040;
    --background-content-rgb: 36, 0, 64;
    --sidebar-bg: #0f001a;
    --sidebar-hover-bg: #4d0080;
    --text-light: #ff00ff;
    --text-dark: #ff00ff;
    --text-muted: #cc00cc;
    --border-color: #660099;
    --table-row-hover-bg: #330066;
    --table-details-bg: #330066;
    --primary-color: #ff006e;
    --primary-color-rgb: 255, 0, 110;
    --primary-hover: #cc0055;
    --status-progress-color: #00ffff;
    --status-completed-color: #ff006e;
    --status-delayed-color: #ff4000;
    --status-planned-color: #8000ff;
    --status-onhold-color: #ffff00;
}

body[data-theme="terminal"] {
    --background-light: #1a1100;
    --background-content: #0f0800;
    --background-content-rgb: 15, 8, 0;
    --sidebar-bg: #0a0500;
    --sidebar-hover-bg: #332200;
    --text-light: #ffb000;
    --text-dark: #ffb000;
    --text-muted: #cc8800;
    --border-color: #332200;
    --table-row-hover-bg: #1a1100;
    --table-details-bg: #1a1100;
    --primary-color: #ffb000;
    --primary-color-rgb: 255, 176, 0;
    --primary-hover: #cc8800;
    --status-progress-color: #ffb000;
    --status-completed-color: #00ff00;
    --status-delayed-color: #ff4000;
    --status-planned-color: #996600;
    --status-onhold-color: #ffff00;
}

body[data-theme="high-contrast"] {
    --background-light: #333333;
    --background-content: #111111;
    --background-content-rgb: 17, 17, 17;
    --sidebar-bg: #000000;
    --sidebar-hover-bg: #555555;
    --text-light: #ffffff;
    --text-dark: #ffffff;
    --text-muted: #cccccc;
    --border-color: #ffffff;
    --table-row-hover-bg: #333333;
    --table-details-bg: #333333;
    --primary-color: #ffff00;
    --primary-color-rgb: 255, 255, 0;
    --primary-hover: #cccc00;
    --status-progress-color: #00ffff;
    --status-completed-color: #00ff00;
    --status-delayed-color: #ff0000;
    --status-planned-color: #ffffff;
    --status-onhold-color: #ffff00;
}

body[data-theme="sepia"] {
    --background-light: #e8dcc0;
    --background-content: #ffffff;
    --background-content-rgb: 255, 255, 255;
    --sidebar-bg: #ede0c8;
    --sidebar-hover-bg: #d7ccc8;
    --text-light: #3e2723;
    --text-dark: #3e2723;
    --text-muted: #5d4037;
    --border-color: #d7ccc8;
    --table-row-hover-bg: #f0f0f0;
    --table-details-bg: #e8dcc0;
    --primary-color: #8b4513;
    --primary-color-rgb: 139, 69, 19;
    --primary-hover: #6d3410;
    --status-progress-color: #8b4513;
    --status-completed-color: #4e7c07;
    --status-delayed-color: #d84315;
    --status-planned-color: #795548;
    --status-onhold-color: #ff8f00;
}/* Lot 
Number Warning Styles */
.input-with-warning {
    position: relative;
    display: flex;
    align-items: center;
}

.warning-icon {
    position: absolute;
    right: 8px;
    font-size: 16px;
    color: #e74c3c;
    cursor: help;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.input-with-warning input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}/* 
Enhanced Activity Logging Styles */
.activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    white-space: nowrap;
}

.activity-badge.process {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #90caf9;
}

.activity-badge.phase {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.activity-badge.component {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 500;
}

.action-badge.zugabe {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #81c784;
}

.action-badge.entnahme {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    border: 1px solid #ef5350;
}

.action-badge.erstellt {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #42a5f5;
}

.action-badge.manuelle {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #ef6c00;
    border: 1px solid #ffb74d;
}

.phase-tag, .component-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: 500;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.component-tag {
    background: #e8f4fd;
    color: #1976d2;
    border-color: #90caf9;
}

/* Dark theme adjustments */
body[data-theme="dark"] .activity-badge.process {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #90caf9;
    border-color: #3f51b5;
}

body[data-theme="dark"] .activity-badge.phase {
    background: linear-gradient(135deg, #4a148c, #6a1b9a);
    color: #ce93d8;
    border-color: #9c27b0;
}

body[data-theme="dark"] .activity-badge.component {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: #a5d6a7;
    border-color: #4caf50;
}

body[data-theme="dark"] .phase-tag,
body[data-theme="dark"] .component-tag {
    background: #333;
    color: #ccc;
    border-color: #555;
}

body[data-theme="dark"] .component-tag {
    background: #1a237e;
    color: #90caf9;
    border-color: #3f51b5;
}