/* ============================================================
   Lead-Detail – modernisiert
   ============================================================ */

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-5);
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

/* Kontakt-Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.contact-item span:not(.contact-label):not(.text-secondary) {
    font-size: var(--text-base);
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
}

.btn-inline {
    padding: 3px 10px;
    font-size: var(--text-xs);
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #0a0a0a;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s var(--ease);
}

.btn-inline:hover {
    background: #0a0a0a;
    color: #ffffff;
}

/* Status Select */
.status-select {
    padding: 7px 30px 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    background: var(--bg-card);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s var(--ease);
}

.status-select:hover {
    border-color: var(--gray-300);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

/* Notes */
.notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--text-base);
    resize: vertical;
    color: var(--text);
    background: var(--bg-card);
    line-height: 1.55;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s var(--ease);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

/* Order Items */
.order-item {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.order-item:first-child {
    padding-top: 0;
}

.order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.order-items-list {
    list-style: none;
    padding: var(--space-2) 0 0 0;
    margin: 8px 0 0 0;
    border-top: 1px dashed var(--border);
}

.order-items-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* Communication Items – Timeline-Look */
.comm-item {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

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

.comm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    gap: var(--space-3);
}

.comm-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--text);
}

.comm-type svg {
    color: var(--text-tertiary);
}

.comm-body {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    background: var(--bg-subtle);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
}

.comm-tracking {
    margin: 6px 0 8px;
}

.tracking-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.tracking-badge.opened {
    background: #0a0a0a;
    color: #ffffff;
}

.tracking-badge.pending {
    background: #fafafa;
    color: #a1a1aa;
    border: 1px dashed #d4d4d8;
}

.comm-form {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

/* Meta Info */
.meta-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

.meta-row span:last-child {
    color: var(--text);
    font-weight: 500;
}

/* ============================================================
   Website-Analyse
   ============================================================ */

.analysis-result {
    padding: 4px 0;
}

.analysis-score {
    font-size: var(--text-2xl);
    font-weight: 700;
    text-align: center;
    padding: var(--space-4);
    border-radius: var(--radius);
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.score-hot {
    background: #0a0a0a;
    color: #ffffff;
    border: 1px solid #0a0a0a;
}

.score-warm {
    background: #ffffff;
    color: #0a0a0a;
    border: 1px dashed #0a0a0a;
}

.score-cold {
    background: #f4f4f5;
    color: #52525b;
    border: 1px solid #e4e4e7;
}

.analysis-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.analysis-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.analysis-row span:first-child {
    color: var(--text-secondary);
}

.analysis-row span:last-child {
    font-weight: 500;
}

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

.analysis-reason {
    background: var(--bg-subtle);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: var(--text-sm);
    border-left: 3px solid #0a0a0a;
}

.text-success { color: #0a0a0a; font-weight: 600; }
.text-danger { color: #0a0a0a; font-weight: 600; text-decoration: line-through; }
.text-warning { color: #52525b; font-weight: 600; }

/* Screenshots */
.screenshot-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.screenshot-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.screenshot-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s var(--ease);
}

.screenshot-tab:hover {
    color: var(--text);
}

.screenshot-tab.active {
    background: var(--bg-card);
    color: #0a0a0a;
    box-shadow: inset 0 -2px 0 #0a0a0a;
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    background: var(--bg-subtle);
}

/* Analysis Sections */
.analysis-section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-top: var(--space-2);
    margin-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

.analysis-section-label:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.analysis-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: var(--space-2) 0;
}

/* Email Preview */
.email-preview {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-top: var(--space-3);
}

.email-preview textarea {
    font-family: inherit;
    font-size: var(--text-sm);
    line-height: 1.55;
}

/* Sequence Status */
.sequence-status {
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-3);
}

.sequence-status h3 {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: var(--space-2);
}

.sequence-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-sm);
}

.sequence-step:last-child {
    border-bottom: none;
}
