:root {
  /* Progvision Branding Colors - High Impact */
  --primary: #2563eb; /* Vibrant Blue */
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --primary-lighter: #dbeafe;
  --primary-glass: rgba(37, 99, 235, 0.15);
  
  /* Accent Colors */
  --accent: #0f172a; /* Deep Navy */
  --accent-light: #334155;
  
  /* Neutrale Farben - Clean & Crisp */
  --white: #ffffff;
  --light: #f8fafc; /* Slate 50 */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --dark: #020617;
  
  /* Status-Farben */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Schatten - Modern & Soft */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-primary: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
  
  /* Rundungen */
  --rounded-sm: 0.375rem;
  --rounded: 0.5rem;
  --rounded-md: 0.75rem;
  --rounded-lg: 1rem;
  --rounded-xl: 1.5rem;
  --rounded-2xl: 2rem;
  --rounded-full: 9999px;
  
  /* Übergänge */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Typografie */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Grundlegende Stile ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--light);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-600);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--rounded);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  line-height: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--white);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--rounded);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--white);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-lighter);
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--rounded-xl);
  border: 1px solid var(--gray-200);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* ===== Utilities ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animation-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* ===== Auth Pages Specific ===== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--light);
}

.auth-card {
  background: var(--white);
  width: 100%;
  max-width: 480px;
  padding: 3rem;
  border-radius: var(--rounded-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1.2rem;
}

.input-with-icon input {
  padding-left: 3rem;
}

/* ===== Builder Specific Overrides ===== */
.builder-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.builder-header-logo img {
  height: 32px;
}

.builder-header-title {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--gray-200);
}

.builder-header-title h1 {
  font-size: 1rem;
  margin: 0;
}

.builder-header-title span {
  font-size: 0.75rem;
  color: var(--gray-500);
  display: block;
}

.app-container {
  margin-top: 64px;
  height: calc(100vh - 64px);
  display: flex;
}

#left-sidebar {
  width: 280px;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
}

#main-canvas {
  flex: 1;
  background: var(--gray-100);
  padding: 2rem;
  overflow: auto;
  display: flex;
  justify-content: center;
}

#canvas-frame {
  background: white;
  box-shadow: var(--shadow-lg);
  transition: width 0.3s ease;
}

/* Responsive Controls */
.responsive-controls {
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: var(--rounded);
  display: flex;
  gap: 0.25rem;
}

.responsive-controls button {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: var(--rounded-sm);
  color: var(--gray-500);
  cursor: pointer;
}

.responsive-controls button.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
/* 
   ==========================================================================
    BUILDER V2 INTERFACE - HIGH PERFORMANCE UI
   ==========================================================================
*/

.builder-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--gray-50);
}

/* --- Builder Header --- */
.builder-header {
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.builder-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--gray-900);
    font-size: 1.1rem;
}

.builder-brand i {
    color: var(--primary);
    font-size: 1.5rem;
}

.device-toggles {
    display: flex;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--rounded-lg);
    gap: 2px;
}

.device-btn {
    border: none;
    background: transparent;
    color: var(--gray-500);
    width: 36px;
    height: 36px;
    border-radius: var(--rounded);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-btn:hover {
    color: var(--gray-900);
    background: rgba(255,255,255,0.5);
}

.device-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.builder-actions {
    display: flex;
    gap: 0.75rem;
}

/* --- Builder Workspace --- */
.builder-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* --- Left Sidebar (Elements) --- */
.builder-sidebar-left {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform 0.3s ease;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-500);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-tab:hover {
    color: var(--gray-700);
    background: var(--gray-50);
}

.sidebar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Block Items */
.block-category h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin: 1.5rem 0 0.75rem;
    padding-left: 0.5rem;
}

.block-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: grab;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.block-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.block-item img {
    width: 100%;
    height: auto;
    opacity: 0.8;
    border-radius: 4px;
}

.block-item span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* --- Canvas Area --- */
.builder-canvas-area {
    flex: 1;
    background-color: #f1f5f9; /* Slate 100 */
    background-image: 
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow: auto;
    position: relative;
}

.device-frame {
    background: var(--white);
    box-shadow: var(--shadow-xl);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.device-frame.desktop { width: 100%; max-width: 1200px; height: 100%; }
.device-frame.tablet { width: 768px; height: 100%; border-radius: 12px; border: 12px solid #333; }
.device-frame.mobile { width: 375px; height: 100%; border-radius: 24px; border: 12px solid #333; }

#canvas {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    overflow-y: auto;
    background: white;
}

/* --- Right Sidebar (Properties) --- */
.builder-sidebar-right {
    width: 300px;
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 40;
}

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

.property-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.property-group input[type='text'],
.property-group input[type='number'],
.property-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: var(--transition);
}

.property-group input:focus,
.property-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-glass);
}

.property-group input[type='color'] {
    width: 100%;
    height: 40px;
    border: 1px solid var(--gray-300);
    border-radius: var(--rounded);
    padding: 2px;
    cursor: pointer;
}

/* --- Empty State --- */
.canvas-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--gray-300);
    margin: 2rem;
    border-radius: var(--rounded-lg);
}

/* --- Floating Action Button for Save --- */
.fab-save {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-primary);
    cursor: pointer;
    transition: var(--transition-bounce);
    z-index: 100;
    border: none;
}

.fab-save:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}


/* 
   ==========================================================================
    WIZARD INTERFACE (New Project)
   ==========================================================================
*/

.new-project-container {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.new-project-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-600) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.new-project-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.project-wizard {
    background: var(--white);
    border-radius: var(--rounded-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.wizard-navigation {
    background: var(--gray-50);
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.wizard-navigation ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.wizard-navigation ul::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
    transform: translateY(-50%);
}

.wizard-navigation li {
    position: relative;
    z-index: 1;
    background: var(--gray-50);
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: default;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-300);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.step-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    transition: var(--transition);
}

.wizard-navigation li.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-lighter);
}

.wizard-navigation li.active .step-text {
    color: var(--primary);
}

.wizard-navigation li.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.wizard-content {
    padding: 3rem;
    min-height: 400px;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-step.active {
    display: block;
}

.wizard-step h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

/* Project Types Grid */
.project-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.project-type-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.project-type-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-type-card.selected {
    border-color: var(--primary);
    background: var(--primary-lighter);
    box-shadow: 0 0 0 2px var(--primary);
}

.project-type-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-type-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.project-type-desc {
    font-size: 0.9rem;
    color: var(--gray-600);
}

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


/* 
   ==========================================================================
    TOOLBAR ELEMENTS - GRID LAYOUT
   ==========================================================================
*/

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.tool-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--rounded);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: grab;
    transition: var(--transition);
    user-select: none;
}

.tool-item:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tool-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.tool-item:hover .tool-icon {
    background: var(--primary);
    color: white;
}

.tool-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    text-align: center;
}

.tool-item:hover span {
    color: var(--primary-dark);
}

/* Dragging State */
.tool-item.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary);
}

