/* Tailwind CSS Base Configuration */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    /* --- Lifetiles Core Colors --- */
    --lt-teal-front: #2A6F75; 
    --lt-teal-mid:   #1D5257; /* Schatten/Hover */
    --lt-teal-dark:  #0E2A2D; /* Tiefer Schatten */
    --lt-teal-hover: #246166; /* Darker teal for hover states */
    --lt-clay:       #E07A5F; /* Akzent */
    --lt-clay-dark:  #c46a52; /* Darker clay for borders */
    --lt-clay-hover: #d66a4f; /* Lighter clay for hover */
    --lt-off-white:  #F9F9F9; /* Hintergrund */
    --lt-graphite:   #333333; /* Text */
    --lt-white:      #FFFFFF;
    
    /* --- Gray Scale --- */
    --lt-gray-100:   #fafafa; /* Lightest gray */
    --lt-gray-200:   #f3f3f3; /* Very light gray */
    --lt-gray-300:   #f0f0f0; /* Light gray */
    --lt-gray-400:   #eee;    /* Light gray borders */
    --lt-gray-500:   #E5E5E5; /* Light gray borders/backgrounds */
    --lt-gray-600:   #ddd;    /* Medium-light gray */
    --lt-gray-700:   #ccc;    /* Medium gray */
    --lt-gray-800:   #999;    /* Medium-dark gray */
    --lt-gray-900:   #666;    /* Dark gray */
    
    /* --- Background Tints --- */
    --lt-bg-teal-light: #F0F9FA; /* Very light teal for completed states */
    --lt-bg-teal-subtle: #F0F4F5; /* Very light teal/gray for log areas */
    
    /* UI Variables */
    --border-radius-main: 2px;
  }
  
  body {
    background-color: var(--lt-off-white);
    color: var(--lt-graphite);
    font-family: 'Roboto', sans-serif;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
  }
}

@layer utilities {
  /* Haptischer "Block"-Schatten (Hard Shadow) */
  .shadow-hard {
    box-shadow: 3px 3px 0px var(--lt-teal-mid);
  }
  .shadow-hard-sm {
    box-shadow: 2px 2px 0px var(--lt-teal-mid);
  }
  
  /* Hard Edges */
  .rounded-lt {
    border-radius: var(--border-radius-main);
  }
  
  /* Hexagon Helper */
  .hexagon-shape {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  }
}

/* =========================================
   COMPONENTS
   ========================================= */

/* --- CARDS --- */
.lt-card {
    background-color: var(--lt-white);
    border: 1px solid var(--lt-gray-500);
    border-radius: var(--border-radius-main);
    box-shadow: 3px 3px 0px rgba(29, 82, 87, 0.15); 
}

/* --- BUTTONS --- */
.btn-3d {
    border-radius: var(--border-radius-main);
    transition: all 0.1s;
    position: relative;
    top: 0;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-3d:active {
    top: 2px;
    box-shadow: 1px 1px 0px inherit !important;
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--lt-teal-front);
    color: white;
    border: 1px solid var(--lt-teal-mid);
    box-shadow: 3px 3px 0px var(--lt-teal-mid);
}
.btn-primary:hover { background-color: var(--lt-teal-hover); }

.btn-accent {
    background-color: var(--lt-clay);
    color: white;
    border: 1px solid var(--lt-clay-dark);
    box-shadow: 3px 3px 0px var(--lt-clay-dark);
}
.btn-accent:hover { background-color: var(--lt-clay-hover); }

.btn-ghost {
    background-color: var(--lt-white);
    color: var(--lt-graphite);
    border: 1px solid var(--lt-gray-700);
    box-shadow: 2px 2px 0px var(--lt-gray-700);
}
.btn-ghost:hover { background-color: var(--lt-gray-300); }

/* --- FORMS (New Inputs) --- */
.lt-input, .lt-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--lt-gray-700);
    border-radius: var(--border-radius-main);
    background-color: white;
    transition: all 0.2s;
}
.lt-input:focus, .lt-select:focus {
    outline: none;
    border-color: var(--lt-teal-front);
    box-shadow: 0 0 0 3px rgba(42, 111, 117, 0.1);
}

/* Toggle Switch (Adapted from Industrial) */
.lt-toggle-btn {
    width: 50px;
    height: 26px;
    background-color: var(--lt-gray-500);
    border-radius: var(--border-radius-main);
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}
.lt-toggle-btn[aria-checked="true"] {
    background-color: var(--lt-teal-front);
}
.lt-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 1px;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.lt-toggle-btn[aria-checked="true"] .lt-toggle-slider {
    transform: translateX(24px);
}

/* Range Slider */
.lt-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--lt-gray-500);
    border-radius: 2px;
}
.lt-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--lt-teal-front);
    cursor: pointer;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* --- WIZARD: STEPPER (Hexagons) --- */
.stepper-hexagon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.step-hex {
    flex: 1;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s;
}
.step-hex.active, .step-hex.completed {
    opacity: 1;
}
.step-hex-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--lt-gray-500);
    color: white;
    font-weight: bold;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.3s;
}
.step-hex.active .step-hex-icon {
    background-color: var(--lt-teal-front);
    transform: scale(1.1);
}
.step-hex.completed .step-hex-icon {
    background-color: var(--lt-teal-mid);
}
.step-hex-label {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}
.step-arrow {
    color: var(--lt-gray-700);
    font-size: 1.25rem;
}

/* --- WIZARD: GENERATING (Phase 4) --- */
.progress-massive {
    width: 100%;
    height: 2rem;
    background-color: var(--lt-gray-500);
    border-radius: var(--border-radius-main);
    overflow: hidden;
    position: relative;
}
.progress-fill-construction {
    height: 100%;
    background-color: var(--lt-teal-front);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,.15),
        rgba(255,255,255,.15) 10px,
        transparent 10px,
        transparent 20px
    );
    background-size: 28px 28px;
    animation: construction-move 1s linear infinite;
    transition: width 0.5s ease-out;
}
@keyframes construction-move {
    0% { background-position: 0 0; }
    100% { background-position: 28px 0; }
}

.living-log {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--lt-bg-teal-subtle); /* Very light teal/gray */
    border-left: 4px solid var(--lt-teal-front);
    border-radius: var(--border-radius-main);
    margin-top: 1.5rem;
}
.living-log-icon {
    font-size: 2rem;
}
.living-log-text {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--lt-graphite);
}
.technical-status {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    color: var(--lt-gray-900);
    margin-top: 0.25rem;
}
/* --- WIZARD PHASE 4: FIX --- */

/* Container für die Icons */
.phase-icons-container {
    margin-top: 3rem;
    border-top: 1px solid var(--lt-gray-400);
    padding-top: 2rem;
}

/* Das Grid selbst */
.phase-icons-grid {
    display: flex; /* Mobile: Horizontal scrollbar oder vertikal */
    flex-direction: column;
    gap: 1rem;
}

/* Desktop: 5 Spalten nebeneinander */
@media (min-width: 768px) {
    .phase-icons-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr); /* Exakt 5 Spalten für die 5 Phasen */
        gap: 1.5rem;
        align-items: stretch;
    }
}

/* Das einzelne Icon-Element */
.phase-icon-item {
    display: flex;
    flex-direction: column; /* Icon oben, Text unten */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
    background-color: var(--lt-white);
    border: 1px solid var(--lt-gray-500);
    border-radius: var(--border-radius-main);
    color: var(--lt-gray-800);
    transition: all 0.3s ease;
    min-height: 100px; /* Einheitliche Höhe */
}

/* Icons größer machen */
.phase-icon-item .icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s;
}

/* Status: Completed (Abgehakt) */
.phase-icon-item.completed {
    background-color: var(--lt-bg-teal-light); /* Helles Teal */
    border-color: var(--lt-teal-front);
    color: var(--lt-teal-front);
}
.phase-icon-item.completed .icon {
    filter: none;
    opacity: 1;
    color: var(--lt-teal-front);
}

/* Status: Active (Aktuell highlighted) */
.phase-icon-item.active {
    background-color: var(--lt-white);
    border: 2px solid var(--lt-teal-front); /* Fetter Rahmen */
    box-shadow: 0 4px 10px rgba(42, 111, 117, 0.15); /* Lift Effekt */
    transform: translateY(-2px);
    color: var(--lt-graphite);
    font-weight: bold;
}
.phase-icon-item.active .icon {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

/* Progress Bar Tweaks */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 0.5rem;
}
.progress-percentage {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--lt-teal-front);
}

/* --- ADMIN TABLES --- */
.lt-table {
    width: 100%;
    border-collapse: collapse;
}
.lt-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background-color: var(--lt-gray-200);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--lt-graphite);
    border-bottom: 2px solid var(--lt-gray-600);
}
.lt-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--lt-gray-400);
}
.lt-table tr:hover td {
    background-color: var(--lt-gray-100);
}

/* --- UPLOAD ZONE --- */
.upload-drop-zone {
    transition: all 0.2s;
}
.upload-drop-zone:hover {
    border-color: var(--lt-teal-front);
    background-color: rgba(42, 111, 117, 0.05);
}
/* --- WIZARD: SETTINGS TABS --- */

/* Container für die Tabs */
.settings-nav-bar {
    border-bottom: 1px solid var(--lt-gray-500);
    padding-bottom: 1px; /* Für den aktiven Border-Overlap */
}

/* Der einzelne Tab-Button */
.settings-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    min-width: 80px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--border-radius-main) var(--border-radius-main) 0 0;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--lt-gray-900);
    position: relative;
    top: 1px; /* Drückt den Tab auf die Linie */
}

/* Hover State */
.settings-tab:hover {
    color: var(--lt-teal-front);
    background-color: rgba(42, 111, 117, 0.05);
}

/* Active State (Der ausgewählte Tab) */
.settings-tab-active {
    background-color: white !important;
    border-color: var(--lt-gray-500);
    border-bottom-color: white; /* Überdeckt die Linie darunter */
    color: var(--lt-teal-front) !important;
    font-weight: bold;
    box-shadow: 0 -2px 0 0 var(--lt-teal-front) inset; /* Teal Balken oben */
}

.settings-tab-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.settings-tab-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile Optimierung: Horizontales Scrollen statt Umbruch */
.settings-tabs-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem; /* Platz für Scrollbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox: Scrollbar verstecken */
}

/* Scrollbar für Chrome/Safari verstecken (optional, sieht cleaner aus) */
.settings-tabs-scroll-container::-webkit-scrollbar {
    display: none;
}