/* Professional Mission Solar Mobile Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mission Solar Website Color Scheme */
:root {
    --primary-color: #2B2B2B;
    --secondary-color: #2B2B2BB8;
    --accent-color: #A64454;
    --accent-hover: #C65466;
    --success-color: #23c288;
    --success-alt: #79c07a;
    --warning-color: #f39c12;
    --danger-color: #E84B65;
    --text-primary: #2B2B2B;
    --text-secondary: #2B2B2B99;
    --text-light: #2B2B2B66;
    --background-cream: #F5F5F4;
    --background-light: #EFEFEF;
    --background-white: #FFFFFF;
    --border-light: #0000001F;
    --border-medium: #00000033;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-natural: 6px 6px 9px rgba(0, 0, 0, 0.2);
    --shadow-deep: 12px 12px 50px rgba(0, 0, 0, 0.4);
    --border-radius-sm: 0.75rem;
    --border-radius-md: 1.25rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2.25rem;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.25rem;
    --spacing-xl: 3.38rem;
    --spacing-xxl: 5.06rem;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-cream);
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    font-weight: 400;
    font-size: 1rem;
}

body:not(.login-page) {
    background: var(--background-cream);
}

/* Mobile-first container styling */
.container,
.login-container,
.section {
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    width: 100%;
    box-shadow: var(--shadow-natural);
    border: 1px solid var(--border-light);
}

.main-section {
    box-shadow: var(--shadow-natural);
    border: 1px solid var(--border-light);
    background: var(--background-light);
    padding: 0.9375rem; /* 15px */
}

/* Desktop adjustments */
@media (min-width: 768px) {
    body {
        padding: var(--spacing-lg);
    }

    .section {
        padding: var(--spacing-xl);
        margin-bottom: 0;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .main-section {
        padding: 0.9375rem; /* 15px on desktop too */
    }
}

/* Login page specific styling */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--background-cream);
}

.login-section {
    box-shadow: var(--shadow-deep);
    border: 1px solid var(--border-light);
}

.login-logo-container {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.login-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: inline-block;
}

@media (min-width: 768px) {
    body.login-page .section {
        max-width: 600px;
        padding: 3.5rem 4rem;
    }

    .login-logo-container {
        margin-bottom: 2.5rem;
        padding-bottom: 2rem;
    }

    .login-logo {
        max-width: 320px;
    }
}

/* Typography - Mobile First */
h1 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Desktop typography adjustments */
@media (min-width: 768px) {
    h1 {
        margin-bottom: var(--spacing-lg);
        font-size: 4.5rem;
        letter-spacing: -1px;
    }

    .subtitle {
        margin-bottom: var(--spacing-xl);
        font-size: 1.125rem;
    }
}


.section-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    letter-spacing: -0.5px;
    text-align: center;
    display: none;
    line-height: 1.3;
}

/* Desktop adjustments for section title */
@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
        margin-bottom: var(--spacing-lg);
    }
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-md);
}

.login-section .form-group {
    margin-bottom: var(--spacing-lg);
}

.login-section .form-group:last-of-type {
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .login-section .form-group {
        margin-bottom: 2rem;
    }

    .login-section .form-group:last-of-type {
        margin-bottom: 2.5rem;
    }
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    background-color: var(--background-white);
    color: var(--text-primary);
    transition: all 0.23s ease;
    font-family: 'Source Sans Pro', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(166, 68, 84, 0.15);
}

.login-section input[type="email"],
.login-section input[type="password"] {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-sm);
}

.login-section input[type="email"]:focus,
.login-section input[type="password"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(166, 68, 84, 0.15);
}

@media (min-width: 768px) {
    .login-section input[type="email"],
    .login-section input[type="password"] {
        padding: 1.25rem 1.75rem;
        font-size: 1.125rem;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.input-group button {
    width: 100%;
}

/* Desktop input group adjustments */
@media (min-width: 768px) {
    .input-group {
        flex-direction: row;
        gap: 12px;
    }

    .input-group button {
        width: auto;
    }
}

/* Buttons - Mobile First */
button {
    background-color: var(--accent-color);
    color: var(--background-white);
    border: none;
    padding: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color 0.23s ease, color 0.23s ease, transform 0.2s ease;
    white-space: nowrap;
    width: 100%;
    margin-bottom: var(--spacing-xs);
    font-family: 'Source Sans Pro', sans-serif;
}

/* Desktop button adjustments */
@media (min-width: 768px) {
    button {
        padding: 1.25rem 2rem;
        width: auto;
        margin-bottom: 0;
    }
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(166, 68, 84, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

button.secondary {
    background-color: var(--success-color);
}

button.secondary:hover {
    background-color: var(--success-alt);
}

/* Main page header */
.main-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
    gap: var(--spacing-sm);
}

.main-logo {
    height: 45px;
    width: auto;
    flex-shrink: 0;
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    min-width: 150px;
    max-width: 100%;
    order: 3;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2rem 0.75rem 3rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    background-color: var(--background-white);
    color: var(--text-primary);
    transition: all 0.23s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%232B2B2B99'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    font-family: 'Source Sans Pro', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(166, 68, 84, 0.15);
    background-image: none;
}

.search-input:not(:placeholder-shown) {
    background-image: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.clear-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background-color: var(--background-light);
    color: var(--text-primary);
    transform: translateY(-50%) scale(1.1);
}

.clear-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

@media (min-width: 768px) {
    .main-header {
        margin-bottom: var(--spacing-lg);
        padding-bottom: var(--spacing-md);
        flex-wrap: nowrap;
        gap: var(--spacing-sm);
    }

    .main-logo {
        height: 55px;
    }

    .search-container {
        flex: 0 1 350px;
        order: 2;
    }

    .search-input {
        padding: 0.875rem 2.25rem 0.875rem 3.25rem;
        font-size: 1rem;
        background-position: left 1.125rem center;
    }

    .logout-btn {
        order: 3;
    }
}

/* Logout button styling */
.logout-btn {
    background-color: var(--accent-color);
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    min-width: auto;
    width: auto;
    margin: 0;
    box-shadow: 0 2px 4px rgba(166, 68, 84, 0.2);
}

.logout-btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(166, 68, 84, 0.3);
}

@media (min-width: 768px) {
    .logout-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Legacy support for old selector */
button[onclick*="logout"] {
    background-color: var(--accent-color);
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
}

button[onclick*="logout"]:hover {
    background-color: var(--accent-hover);
}

/* Status Messages */
.loading {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

.login-section .loading {
    margin-top: 24px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.login-section .loading p {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.error,
.error-message {
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
    padding: var(--spacing-md) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    margin-top: var(--spacing-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    display: none;
    box-shadow: 0 2px 4px rgba(232, 75, 101, 0.15);
}

/* Error with copy button layout */
.error {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.error .error-message {
    flex: 1;
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.error-copy-btn {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.error-copy-btn:hover {
    background-color: #c43c50;
}

.error-copy-btn.copied {
    background-color: var(--success-color);
}

.login-section .error-message {
    margin-bottom: 20px;
    margin-top: 0;
    border-left: 4px solid var(--danger-color);
    font-weight: 500;
}

.success {
    background-color: #f0f9f4;
    border: 1px solid #c3e6cb;
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
    padding: var(--spacing-md) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    margin-top: var(--spacing-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(35, 194, 136, 0.15);
}

.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--accent-color);
    padding: var(--spacing-md) var(--spacing-sm);
    margin-top: var(--spacing-md);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-section .info-box {
    margin-top: 24px;
    background-color: #e8f4f8;
    border-left-color: var(--accent-color);
    font-size: 12px;
    line-height: 1.5;
}

.login-section button[type="submit"] {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(166, 68, 84, 0.25);
}

.login-section button[type="submit"]:hover {
    box-shadow: 0 5px 18px rgba(166, 68, 84, 0.35);
}

@media (min-width: 768px) {
    .login-section .info-box {
        font-size: 1rem;
        padding: 1.25rem 1.5rem;
    }

    .login-section button[type="submit"] {
        padding: 1.375rem 2rem;
        font-size: 1.125rem;
    }
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Detail Labels */
.detail-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 4px;
    font-weight: 400;
}

/* Task Cards - Mobile First */
.task-card {
    background: var(--background-white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-sm);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-natural);
}

/* Desktop task card adjustments */
@media (min-width: 768px) {
    .task-card {
        padding: var(--spacing-lg);
        margin-top: var(--spacing-lg);
    }
}

.task-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.task-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.task-description {
    background: var(--background-white);
    padding: 0;
    border-radius: 4px;
    margin-top: 12px;
    line-height: 1.5;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Desktop task description adjustments */
@media (min-width: 768px) {
    .task-description {
        padding: 16px;
        line-height: 1.6;
        font-size: 1rem;
    }
}

.task-description h1,
.task-description h2,
.task-description h3 {
    color: var(--primary-color);
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.task-description ul,
.task-description ol {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.task-description p {
    margin-bottom: 8px;
}

.task-description img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border: 1px solid var(--border-light);
    display: block;
}

.task-description img[alt="[Bild nicht verfügbar]"] {
    border: 2px dashed var(--border-medium);
    padding: 20px;
    background-color: #f8f9fa;
    text-align: center;
    color: var(--text-secondary);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Task Grid - Mobile First */
.task-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* Desktop task grid */
@media (min-width: 768px) {
    .task-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-top: var(--spacing-md);
    }
}

.task-kanban-card {
    background: var(--background-white);
    border-radius: var(--border-radius-md);
    padding: 0.9375rem; /* 15px */
    margin-bottom: var(--spacing-xs);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-natural);
    cursor: pointer;
    transition: all 0.23s ease;
    position: relative;
    min-width: 0; /* Prevent grid overflow from wide content */
}

/* Desktop task card adjustments */
@media (min-width: 768px) {
    .task-kanban-card {
        padding: 0.9375rem; /* 15px on desktop too */
        margin-bottom: 0;
    }
}

.task-kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-deep);
    border-color: var(--accent-color);
}

.task-kanban-card:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.task-kanban-card.selected {
    border-color: var(--success-color);
    background-color: #f8fff8;
    box-shadow: 0 0 0 3px rgba(35, 194, 136, 0.15);
}

/* IMPORTANT: Keep task-date-tag colors unchanged - Mobile First */
.task-date-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    text-transform: lowercase;
    box-shadow: 0 1px 3px var(--shadow-medium);
    z-index: 1;
    /* Colors are set dynamically via style attribute - do not override */
}

/* Desktop task-date-tag adjustments */
@media (min-width: 768px) {
    .task-date-tag {
        top: 12px;
        right: 12px;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
    }
}

.task-kanban-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.3;
    padding-right: 70px;
}

/* Desktop task title adjustments */
@media (min-width: 768px) {
    .task-kanban-title {
        margin-bottom: 12px;
        font-size: 1rem;
        line-height: 1.4;
        padding-right: 80px;
    }
}

.task-kanban-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.task-kanban-meta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 0.75rem;
}

/* Desktop task meta adjustments */
@media (min-width: 768px) {
    .task-kanban-meta-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        font-size: 0.8rem;
    }
}

.task-kanban-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.task-kanban-value {
    color: var(--text-primary);
    text-align: left;
    margin-left: 0;
    font-weight: 500;
}

/* Desktop task value adjustments */
@media (min-width: 768px) {
    .task-kanban-value {
        text-align: right;
        flex: 1;
        margin-left: 12px;
        font-weight: 400;
    }
}

.task-stage {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.task-count {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: var(--background-light);
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

@media (min-width: 768px) {
    .task-count {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-lg);
    }
}

.address-link,
.phone-link,
.email-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.23s ease;
}

.address-link:hover,
.phone-link:hover,
.email-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Contact info section in expanded task view */
.task-contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: var(--surface-color);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.task-contact-info .contact-item {
    font-size: 0.95rem;
    color: var(--text-color);
}

.task-details-below {
    grid-column: 1 / -1;
}

/* Expanded task content inside the card */
.expanded-task-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.task-description-expanded {
    background: transparent;
    padding: 0;
    line-height: 1.5;
    color: var(--text-primary);
    font-size: 0.875rem;
    overflow-x: auto;
}

.task-description-expanded img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border: 1px solid var(--border-light);
    display: block;
}

.task-description-expanded h1,
.task-description-expanded h2,
.task-description-expanded h3 {
    color: var(--primary-color);
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.task-description-expanded ul,
.task-description-expanded ol {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.task-description-expanded p {
    margin-bottom: 8px;
}

/* DC Construction section styling */
.dc-construction-section {
    margin-bottom: 16px;
}

.dc-construction-section h3 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 0;
}

.dc-fields-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.dc-fields-table td {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    vertical-align: top;
}

.dc-fields-table .field-label {
    background-color: var(--background-light);
    font-weight: 500;
    width: 40%;
    color: var(--text-primary);
}

.dc-fields-table .field-value {
    background-color: var(--background-white);
    color: var(--text-primary);
    width: 60%;
}

/* Desktop adjustments for DC Construction table */
@media (min-width: 768px) {
    .dc-construction-section h3 {
        font-size: 1.125rem;
        margin-bottom: 16px;
    }

    .dc-fields-table {
        font-size: 0.9rem;
    }

    .dc-fields-table td {
        padding: 10px 16px;
    }
}

/* Construction Plan Description styling */
.construction-plan-description {
    margin-bottom: 16px;
    overflow-x: auto;
}

.construction-plan-description h3 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 0;
}

.construction-plan-description ul,
.construction-plan-description ol {
    margin-left: 20px;
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.construction-plan-description p {
    margin-bottom: 8px;
}

.construction-plan-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
}

@media (min-width: 768px) {
    .construction-plan-description h3 {
        font-size: 1.125rem;
        margin-bottom: 16px;
    }
}

.button-container {
    text-align: center;
    margin-bottom: 20px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card,
.task-kanban-card {
    animation: slideIn 0.3s ease;
}


/* Small mobile devices (max-width: 480px) - additional refinements */
@media (max-width: 480px) {
    .task-kanban-title {
        font-size: 0.85rem;
        padding-right: 80px;
        /* Ensure room for date tag on mobile too */
    }

    .task-date-tag {
        top: 6px;
        right: 6px;
        padding: 2px 5px;
        font-size: 0.6rem;
        border-radius: 6px;
    }
}

/* Task Complete Button */
.task-complete-btn {
    position: absolute;
    bottom: 0;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    color: var(--success-color);
    border: 2px solid var(--success-color);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: bold;
    transition: all 0.23s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(35, 194, 136, 0.2);
}

.task-complete-btn:hover {
    background-color: var(--success-color);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(35, 194, 136, 0.3);
}

.task-complete-btn:active {
    transform: scale(0.95);
}

/* Desktop complete button adjustments */
@media (min-width: 768px) {
    .task-complete-btn {
        bottom: 8px;
        right: 8px;
    }
}

/* Adjust task card padding to accommodate button */
.task-kanban-card {
    position: relative;
    padding-bottom: 45px;
    /* Make room for complete button at bottom */
}

.task-kanban-title {
    padding-right: 80px;
    /* Make room for date tag */
    font-weight: 650;
}

/* Subtask Indicator Label - Bottom Left (visual only) */
.subtask-indicator {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(44, 62, 80, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 5;
    pointer-events: none; /* Make it non-interactive */
}

/* Desktop subtask indicator adjustments */
@media (min-width: 768px) {
    .subtask-indicator {
        bottom: 12px;
        left: 12px;
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

/* Task Loading Indicator */
.task-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-top: 12px;
    border-top: 2px solid var(--border-light);
}

.task-loading-indicator p {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Subtask Container */
.subtask-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--border-light);
}

/* Subtask Styling - Slightly Smaller */
.task-subtask {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8f9fa;
    margin-bottom: 8px;
}

.task-subtask:last-child {
    margin-bottom: 0;
}

/* Desktop subtask adjustments */
@media (min-width: 768px) {
    .subtask-container {
        margin-top: 16px;
        padding-top: 16px;
    }

    .task-subtask {
        width: 96%;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 43, 43, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--background-white);
    margin: var(--spacing-md);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-md);
    max-width: 400px;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow-deep);
    animation: modalSlideUp 0.2s ease-out;
    border: 1px solid var(--border-light);
}

.modal-content h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
    font-size: 1rem;
}

.confirmation-item-list {
    margin: 0 0 var(--spacing-md) 0;
    padding: 0 0 0 var(--spacing-md);
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-align: left;
}

.confirmation-item-list li {
    margin-bottom: 4px;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
}

.modal-buttons button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 200px;
}

/* Wider buttons on desktop */
@media (min-width: 768px) {
    .modal-buttons {
        justify-content: flex-end;
    }

    .modal-buttons button {
        flex: 0 0 auto;
        max-width: none;
    }
}

.confirm-btn {
    background-color: var(--success-color);
}

.confirm-btn:hover {
    background-color: var(--success-alt);
}

.cancel-btn {
    background-color: var(--text-secondary);
}

.cancel-btn:hover {
    background-color: var(--secondary-color);
}

/* Animations for modal */
@keyframes modalSlideUp {
    from {
        transform: translateY(20px) translateZ(0);
        opacity: 0;
    }
    to {
        transform: translateY(0) translateZ(0);
        opacity: 1;
    }
}

/* Desktop adjustments for modal */
@media (min-width: 768px) {
    .modal-content {
        max-width: 500px;
        padding: var(--spacing-xl);
    }

    .modal-content h3 {
        font-size: 1.75rem;
    }

    .modal-buttons button {
        padding: 1rem 2rem;
        font-size: 1.0625rem;
    }
}

/* Ensure button doesn't overlap with date tag on small screens */
@media (max-width: 480px) {
    .task-complete-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
        bottom: var(--spacing-xs);
        right: var(--spacing-xs);
    }
}

/* ===============================================
   PV STÜCKLISTE (BOM) TOOL STYLES
   =============================================== */

/* BOM Section Container */
.bom-section {
    max-width: 900px;
    margin: 0 auto;
}

/* BOM Project Header */
.bom-project-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.bom-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-align: left;
}

.bom-project-info {
    background: var(--background-white);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-light);
}

.project-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.project-customer {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* BOM Collapsible Sections */
.bom-checklist-section,
.bom-extra-section,
.bom-category {
    background: var(--background-white);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-light);
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.bom-section-header,
.bom-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--background-light);
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    transition: background-color 0.2s ease;
}

.bom-section-header:hover,
.bom-category-header:hover {
    background: var(--border-light);
}

.toggle-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.bom-section-content,
.bom-category-content {
    padding: var(--spacing-sm);
}

/* Allow search dropdown to overflow in extra products section */
.bom-extra-section {
    overflow: visible;
}

/* Fix border-radius for sections with overflow:visible - apply to header/content directly */
.bom-extra-section .bom-section-header {
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.bom-extra-section .bom-section-content {
    overflow: visible;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
}

/* Comment textarea in Stückliste */
.comment-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Checklist Table */
.checklist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.checklist-table tr {
    border-bottom: 1px solid var(--border-light);
}

.checklist-table tr:last-child {
    border-bottom: none;
}

.checklist-table td {
    padding: 8px;
    vertical-align: top;
}

.checklist-table .field-label {
    font-weight: 500;
    color: var(--text-secondary);
    width: 45%;
}

.checklist-table .field-value {
    color: var(--text-primary);
}

.checklist-grid {
    display: grid;
    gap: 4px;
}

/* BOM Form Section */
.bom-form-section {
    margin-bottom: var(--spacing-md);
}

.bom-form-section .section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* BOM Row (Article Type Selection) */
.bom-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.bom-row:last-child {
    border-bottom: none;
}

.bom-row-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dimensionierung-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1em;
    margin-left: 6px;
    font-weight: 600;
}

.dimensionierung-link:hover {
    color: var(--primary-dark);
}

.bom-row-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.bom-select {
    width: 100%;
    max-width: 280px;
    padding: 10px 12px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    background: var(--background-white);
    color: var(--text-primary);
    cursor: pointer;
}

.bom-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(166, 68, 84, 0.15);
}

/* Text inputs and textareas should have text cursor, not pointer */
input[type="text"].bom-select,
input[type="number"].bom-select,
textarea.bom-select {
    cursor: text;
}

.bom-qty {
    width: 70px;
    padding: 10px 8px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    text-align: center;
    background: var(--background-white);
}

.bom-qty:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(166, 68, 84, 0.15);
}

/* Auto-populated row highlighting (verification required) */
.bom-row.auto-populated {
    background: #fef9c3;
    border-left: 3px solid #eab308;
    padding-left: calc(var(--spacing-xs) + 8px);
    border-radius: 4px;
    margin: 4px 0;
}

.btn-verify {
    padding: 6px 12px;
    background: #eab308;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 8px;
    margin-right: 8px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-verify:hover {
    background: #ca8a04;
}

/* Verified state (after user confirmation) */
.bom-row.verified {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    padding-left: calc(var(--spacing-xs) + 8px);
    border-radius: 4px;
    margin: 4px 0;
}

.verify-check {
    color: #22c55e;
    font-weight: bold;
    margin-left: 8px;
    font-size: 1rem;
}

/* Extra products - auto-populated styling */
.extra-product-row.auto-populated {
    background: #fef9c3;
    border-left: 3px solid #eab308;
    border-color: #eab308;
}

.extra-product-row.verified {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
    border-color: #22c55e;
}

/* Extra Products Section */
.extra-products-search {
    position: relative;
    margin-bottom: var(--spacing-sm);
}

.extra-products-search .search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    background: var(--background-white);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border: 1px solid var(--border-medium);
    border-top: none;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-natural);
    display: none;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected,
.search-result-item.active {
    background: var(--background-light);
}

.search-result-category,
.product-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.search-error {
    padding: 16px;
    text-align: center;
    color: #dc2626;
    font-size: 0.875rem;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Extra Products List */
.extra-products-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.extra-product-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--background-light);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-light);
}

.extra-product-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: #c93850;
    transform: scale(1.05);
}

/* BOM Action Buttons */
.bom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    flex: 1;
    min-width: 200px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(166, 68, 84, 0.3);
}

.btn-secondary {
    background: var(--background-light);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--border-light);
}

/* Loading Inline */
.loading-inline {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.no-data {
    padding: var(--spacing-sm);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Desktop adjustments for BOM */
@media (min-width: 768px) {
    .bom-title {
        font-size: 1.75rem;
    }

    .bom-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .bom-row-label {
        flex: 0 0 180px;
    }

    .bom-row-controls {
        flex: 1;
    }

    .bom-select {
        max-width: 320px;
    }

    .bom-qty {
        width: 80px;
    }

    .bom-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .btn-primary {
        flex: 0 0 auto;
        min-width: auto;
    }
}

/* BOM Two-Column Layout (Sidebar + Main) */
.bom-layout {
    display: block; /* Mobile: stacked layout */
}

.bom-sidebar {
    margin-bottom: var(--spacing-md);
}

.bom-main {
    /* Mobile: full width */
}

/* Desktop: Side-by-side layout with sticky sidebar */
@media (min-width: 1024px) {
    .bom-section {
        max-width: 1200px; /* Allow wider container for two columns */
    }

    .bom-layout {
        display: flex;
        gap: var(--spacing-lg);
        align-items: flex-start;
    }

    .bom-sidebar {
        flex: 0 0 320px;
        position: sticky;
        top: var(--spacing-md);
        max-height: calc(100vh - 2 * var(--spacing-md));
        overflow-y: auto;
        margin-bottom: 0;
    }

    /* Style the sidebar checklist section */
    .bom-sidebar .bom-checklist-section {
        margin-bottom: 0;
    }

    /* Remove collapsible behavior on desktop - always show */
    .bom-sidebar .bom-section-header {
        cursor: default;
    }

    .bom-sidebar .toggle-icon {
        display: none;
    }

    .bom-sidebar .bom-section-content {
        display: block !important; /* Always visible on desktop */
    }

    .bom-main {
        flex: 1;
        min-width: 0; /* Prevent flex overflow */
    }
}

/* ===========================================
   Notion Mode Styles
   =========================================== */

/* Notion Input Section */
.notion-input-section {
    background: var(--background-white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.notion-input-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.notion-input-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.notion-textarea {
    width: 100%;
    min-height: 300px;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--background-light);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.notion-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(166, 68, 84, 0.15);
}

.notion-textarea::placeholder {
    color: var(--text-light);
}

/* Contact Selection Section */
.contact-selection-section {
    background: var(--background-white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.contact-selection-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.contact-selection-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* Contact Cards Grid */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.contact-card {
    background: var(--background-light);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: var(--accent-color);
    background: var(--background-white);
    box-shadow: 0 4px 12px var(--shadow-light);
    transform: translateY(-2px);
}

.contact-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.contact-card-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-card-phone,
.contact-card-address,
.contact-card-project {
    margin-bottom: 4px;
}

.contact-card-project {
    color: var(--accent-color);
    font-weight: 500;
}

/* Mobile adjustments for Notion mode */
@media (max-width: 767px) {
    .notion-textarea {
        min-height: 250px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   PRODUKTETIKETTEN (Product Labels) Styles
   ============================================== */

.label-section {
    max-width: 1200px;
    margin: 0 auto;
}

.label-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.label-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.label-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Search Section */
.label-search-section {
    margin-bottom: var(--spacing-lg);
}

.label-filter-container {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.label-search-container {
    display: flex;
    gap: var(--spacing-sm);
    align-items: stretch;
}

.label-search-container .search-input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    background: var(--background-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.label-search-container .search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(166, 68, 84, 0.15);
}

.label-search-container .btn {
    white-space: nowrap;
    padding: 0.875rem 1.5rem;
}

/* Results Section */
.label-results-section {
    background: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.label-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.label-results-header > span {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.label-selection-controls {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Product List Grid */
.label-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
}

/* Product Card */
.label-product-card {
    background: var(--background-white);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.label-product-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px var(--shadow-light);
    transform: translateY(-2px);
}

.label-product-card.selected {
    border-color: var(--accent-color);
    background: rgba(166, 68, 84, 0.05);
}

.label-product-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: bold;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.label-product-card.selected .label-product-checkbox {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.label-product-info {
    flex: 1;
    min-width: 0;
}

.label-product-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: var(--spacing-xs);
    /* Truncate long names */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.label-product-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Actions Section */
.label-actions {
    margin-top: var(--spacing-md);
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Desktop adjustments for Labels */
@media (min-width: 768px) {
    .label-title {
        font-size: 1.75rem;
    }

    .label-search-container .btn {
        padding: 0.875rem 2rem;
    }

    .label-product-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Mobile adjustments for Labels */
@media (max-width: 767px) {
    .label-search-container {
        flex-direction: column;
    }

    .label-search-container .btn {
        width: 100%;
    }

    .label-product-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .label-results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-large {
        width: 100%;
    }
}

/* ========================================
   UK Schrägdach Calculator Styles
   ======================================== */

/* Calculator container */
.roof-calculator {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.roof-calculator-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.75rem;
}

/* Configuration table */
.roof-config-table {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.roof-config-header {
    display: grid;
    grid-template-columns: 70px 1fr 70px 55px 30px;
    gap: 6px;
    padding: 0.5rem;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.roof-config-row {
    display: grid;
    grid-template-columns: 70px 1fr 70px 55px 30px;
    gap: 6px;
    padding: 0.5rem;
    border-top: 1px solid #f1f5f9;
    align-items: center;
}

.roof-config-row:first-of-type {
    border-top: none;
}

/* Input fields */
.roof-input,
.roof-select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
}

.roof-input:focus,
.roof-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.roof-input::placeholder {
    color: #94a3b8;
}

/* Remove spinner buttons from number inputs */
.roof-input[type="number"]::-webkit-outer-spin-button,
.roof-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.roof-input[type="number"] {
    -moz-appearance: textfield;
}

/* Remove button */
.roof-remove-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    position: relative;
    z-index: 1;
}

.roof-remove-btn:hover:not(:disabled) {
    background: #fecaca;
}

.roof-remove-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Actions row */
.roof-config-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    gap: 1rem;
}

.roof-total {
    font-size: 0.875rem;
    color: #475569;
}

.roof-total strong {
    color: #1e40af;
    font-size: 1rem;
}

/* Calculate button section */
.roof-calculate-section {
    margin-top: 1rem;
    text-align: center;
}

.roof-calculate-section .btn {
    min-width: 150px;
}

/* Small button variant */
.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Calculated quantity highlight */
.bom-qty.calculated {
    background: #dcfce7;
    border-color: #86efac;
    transition: background 0.3s, border-color 0.3s;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .roof-config-header {
        display: none;
    }

    .roof-config-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
        position: relative;
    }

    .roof-config-row::before {
        content: none;
    }

    .roof-col-sparren,
    .roof-col-mpr,
    .roof-col-rows,
    .roof-col-red {
        position: relative;
    }

    .roof-config-row .roof-col-sparren::before { content: "Sparren: "; font-size: 0.7rem; color: #64748b; }
    .roof-config-row .roof-col-mpr::before { content: "Mod/Reihe: "; font-size: 0.7rem; color: #64748b; }
    .roof-config-row .roof-col-rows::before { content: "Reihen: "; font-size: 0.7rem; color: #64748b; }
    .roof-config-row .roof-col-red::before { content: "Red %: "; font-size: 0.7rem; color: #64748b; }

    .roof-col-dachtyp {
        grid-column: span 2;
    }

    .roof-col-action {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }

    .roof-config-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ========================================
   Deal Won Page Styles
   ======================================== */

/* Two-column layout for Deal Won (desktop-first, like BOM) */
.deal-won-layout {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.deal-won-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: var(--spacing-md);
}

.deal-won-main {
    flex: 1;
    min-width: 0;
}

/* Textarea styling */
.deal-won-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.deal-won-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(166, 68, 84, 0.1);
}

.deal-won-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* Error box */
.deal-won-error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    color: #dc2626;
    margin-top: var(--spacing-sm);
}

/* Required field indicator */
.required-star {
    color: #dc2626;
    font-weight: 600;
}

/* Delete button for existing order lines */
.btn-delete-line {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    background: var(--background-light);
    color: #dc2626;
    border: 1px solid var(--border-medium);
}

.btn-delete-line:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

/* Existing lines table styling */
.existing-lines-table {
    width: 100%;
    border-collapse: collapse;
}

.existing-lines-table td {
    vertical-align: middle;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border-light);
}

.existing-lines-table tr:last-child td {
    border-bottom: none;
}

.line-product-name {
    flex: 1;
}

.line-quantity {
    width: 70px;
    text-align: center;
}

.qty-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.875rem;
    background: white;
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.line-actions {
    width: 40px;
    text-align: center;
}

/* Mobile adjustments for Deal Won */
@media (max-width: 767px) {
    .deal-won-layout {
        flex-direction: column;
    }

    .deal-won-sidebar {
        flex: none;
        width: 100%;
        position: static;
    }

    .deal-won-main {
        width: 100%;
    }
}

/* =============================================================================
   CHECKLIST - Daten-Vor-Ort-Termin Specific Styles
   ============================================================================= */

/* Checklist form container */
.checklist-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Section note (informational text within sections) */
.section-note {
    padding: 8px 12px;
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #0369a1;
    margin-bottom: var(--spacing-sm);
}

/* Conditional fields container */
.conditional-fields-container {
    margin-top: var(--spacing-xs);
}

.conditional-field {
    background: #fafafa;
    border-left: 2px solid var(--border-medium);
    padding-left: calc(var(--spacing-xs) + 8px);
    margin: 4px 0;
}

/* Checklist textarea */
.checklist-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Checkbox field group - stacked layout with label above checkboxes */
.checkbox-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--spacing-xs) 0;
}

.checkbox-field-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Checkbox group for multi-select options */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding-left: 4px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px 8px;
    width: 100%;
    border-radius: 4px;
}

.checkbox-row:hover {
    background: var(--background-light);
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: var(--primary-blue);
    margin: 0;
}

.checkbox-row span {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Photo Upload Styles */
.photo-upload-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.photo-upload-row:last-child {
    border-bottom: none;
}

.photo-upload-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.photo-upload-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.photo-input {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    background: var(--background-white);
}

.photo-input:disabled {
    background: var(--background-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.photo-preview {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.8125rem;
}

.upload-progress {
    color: var(--text-secondary);
    font-style: italic;
}

.upload-success {
    color: var(--success-color);
    font-weight: 500;
}

.upload-error {
    color: var(--danger-color);
    font-weight: 500;
}

.photo-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.photo-link:hover {
    text-decoration: underline;
}

/* Uppy Dashboard Overrides */
.photo-type-section {
    margin-bottom: 20px;
}

.photo-type-label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Make Uppy dashboard blend with professional.css */
.uppy-Dashboard-inner {
    border: 1px solid var(--border-medium) !important;
    border-radius: var(--border-radius-sm) !important;
    background: var(--background-white) !important;
}

.uppy-Dashboard-dropFilesHereHint {
    color: var(--text-secondary) !important;
}

.uppy-Dashboard-AddFiles-title {
    color: var(--text-primary) !important;
}

.uppy-Dashboard-AddFiles-title button,
.uppy-Dashboard-AddFiles-title button:hover {
    color: var(--accent-color) !important;
}

/* Progress and status colors */
.uppy-StatusBar-progress {
    background: var(--accent-color) !important;
}

.uppy-StatusBar.is-complete .uppy-StatusBar-progress {
    background: var(--success-color) !important;
}

/* File item styling */
.uppy-Dashboard-Item-action--remove {
    color: var(--danger-color) !important;
}

.uppy-Dashboard-Item-previewImg {
    transform: scale(0.6) !important;
}

/* Hide "Powered by Uppy" */
.uppy-Dashboard-poweredByUppy {
    display: none !important;
}

/* Smaller dashboard for mobile */
@media (max-width: 767px) {
    .uppy-Dashboard-inner {
        height: 200px !important;
    }

    .photo-type-section {
        margin-bottom: 16px;
    }
}

/* Drive Status Indicators */
.drive-status {
    margin-bottom: var(--spacing-sm);
}

.drive-warning {
    padding: 10px 14px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #92400e;
}

.drive-ok {
    padding: 10px 14px;
    background: #d1fae5;
    border-left: 3px solid #10b981;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: #065f46;
}

/* Single Photo Upload Component (for Odoo binary fields) */
.single-photo-section {
    margin-bottom: 20px;
}

.single-photo-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.single-photo-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    background: var(--background-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-photo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
    padding: 20px;
}

.single-photo-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.single-photo-status {
    font-size: 0.8125rem;
    min-height: 20px;
}

.single-photo-status .upload-progress {
    color: var(--accent-color);
}

.single-photo-status .upload-pending {
    color: var(--text-secondary);
    font-style: italic;
}

.single-photo-status .upload-success {
    color: var(--success-color);
}

.single-photo-status .upload-error {
    color: var(--danger-color);
}

/* Mobile optimization for single photo */
@media (max-width: 767px) {
    .single-photo-preview {
        max-width: 100%;
        height: 180px;
    }
}

/* Small button variant */
.btn-small {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

/* Mobile camera capture optimization */
@media (max-width: 767px) {
    .photo-upload-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .photo-input {
        width: 100%;
    }

    .btn-small {
        width: 100%;
        text-align: center;
    }
}

/* Desktop adjustments for photo upload */
@media (min-width: 768px) {
    .photo-upload-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .photo-upload-label {
        flex: 0 0 200px;
    }

    .photo-upload-controls {
        flex: 1;
        flex-direction: row;
    }

    .photo-input {
        flex: 1;
        max-width: 300px;
    }
}

/* Infinite Scroll / Lazy Loading */
.scroll-sentinel {
    display: flex;
    justify-content: center;
    padding: var(--spacing-lg);
    min-height: 60px;
}

.scroll-sentinel .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}