/* ═══════════════════════════════════════════════════════════════════════
   Köhler-Transfer — Component Design System
   Controlling Dashboard · Big Data Intelligence powered by AI/KI
   Larger, readable fonts · Mobile responsive
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Cards ────────────────────────────────────────────────────────────── */
.kt-card {
    background: #ffffff;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    padding: 24px;
}
@media (max-width: 768px) { .kt-card { padding: 16px; } }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.kt-btn-primary {
    background: #C10019;
    color: white;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
}
.kt-btn-primary:hover { background: #9B0B22; }
@media (max-width: 768px) { .kt-btn-primary { font-size: 16px; padding: 10px 18px; } }

.kt-btn-secondary {
    background: #ffffff;
    border: 1px solid #E8E8E8;
    color: #1a1a1a;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: border-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
}
.kt-btn-secondary:hover { border-color: #1a1a1a; }
@media (max-width: 768px) { .kt-btn-secondary { font-size: 16px; padding: 10px 18px; } }

/* ── Inputs ───────────────────────────────────────────────────────────── */
.kt-input {
    background: #ffffff;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Barlow', sans-serif;
    font-size: 17px;
    color: #1a1a1a;
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}
.kt-input:focus { border-color: #C10019; }
.kt-input::placeholder { color: #555555; }

/* ── Tables ───────────────────────────────────────────────────────────── */
.kt-table {
    width: 100%;
    border-collapse: collapse;
}
.kt-table th {
    background: #F5F5F5;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555555;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E8E8E8;
}
.kt-table td {
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 400;
    padding: 12px 16px;
    border-bottom: 1px solid #E8E8E8;
    color: #1a1a1a;
}
.kt-table tr:nth-child(even) td { background: #F5F5F5; }
.kt-table tr:hover td { background: rgba(200,16,46,0.03); }

/* ── Badges ───────────────────────────────────────────────────────────── */
.kt-badge {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 99px;
    display: inline-block;
    white-space: nowrap;
}
.kt-badge-pending   { background: rgba(217,119,6,0.1);  color: #D97706; }
.kt-badge-approved  { background: rgba(5,150,105,0.1);  color: #059669; }
.kt-badge-rejected  { background: rgba(220,38,38,0.1);  color: #DC2626; }
.kt-badge-processing{ background: rgba(124,58,237,0.1); color: #7C3AED; }
.kt-badge-sales     { background: rgba(37,99,235,0.1);  color: #2563EB; }
.kt-badge-marketing { background: rgba(8,145,178,0.1);  color: #0891B2; }

/* ── KPI Card ─────────────────────────────────────────────────────────── */
.kt-kpi-card {
    background: #ffffff;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}
.kt-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--stripe-color, #C10019);
}
.kt-kpi-card .kpi-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 40px;
    color: var(--stripe-color, #C10019);
    line-height: 1;
}
.kt-kpi-card .kpi-label {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555555;
    letter-spacing: 0.5px;
    margin-top: 6px;
}
@media (max-width: 768px) {
    .kt-kpi-card .kpi-value { font-size: 32px; }
    .kt-kpi-card { padding: 14px 16px; }
}

/* ── Confidence Bar ───────────────────────────────────────────────────── */
.confidence-bar {
    height: 6px;
    background: #E8E8E8;
    border-radius: 99px;
    overflow: hidden;
    width: 100%;
}
.confidence-bar .fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s ease;
}
.confidence-bar .fill.high    { background: #059669; }
.confidence-bar .fill.medium  { background: #D97706; }
.confidence-bar .fill.low     { background: #DC2626; }

/* ── Nav Links ────────────────────────────────────────────────────────── */
.kt-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555555;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.kt-nav-link:hover { background: #F5F5F5; color: #1a1a1a; }
.kt-nav-link.active { color: #C10019; background: rgba(200,16,46,0.06); }

/* ── Section Label ────────────────────────────────────────────────────── */
.kt-section-label {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #555555;
    margin-bottom: 6px;
}
.kt-section-label + hr {
    border: none;
    height: 2px;
    background: #C10019;
    margin-top: 4px;
    margin-bottom: 16px;
}

/* ── Agent Tag ────────────────────────────────────────────────────────── */
.agent-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(124,58,237,0.2);
    color: #7C3AED;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 99px;
}

/* ── Step Progress ────────────────────────────────────────────────────── */
.kt-step {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}
.kt-step .step-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.kt-step .step-circle.done   { background: #111111; color: white; }
.kt-step .step-circle.active { background: #C10019; color: white; }
.kt-step .step-circle.todo   { border: 1px solid #E8E8E8; color: #555555; background: white; }
.kt-step .step-line { flex: 1; height: 1px; background: #E8E8E8; }
.kt-step .step-label {
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #555555;
    margin-top: 6px;
    white-space: nowrap;
}
.kt-step .step-label.active { color: #C10019; }
.kt-step .step-label.done   { color: #1a1a1a; }

/* ── Responsive helpers ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .kt-sidebar { display: none !important; }
    .kt-nav-link { font-size: 14px; padding: 6px 10px; }
    .kt-input { font-size: 16px; } /* prevents iOS auto-zoom */
    .kt-btn-primary, .kt-btn-secondary { width: 100%; justify-content: center; }
    .kt-toast { max-width: calc(100vw - 32px); font-size: 14px; padding: 12px 16px; }
    .kt-table th { font-size: 11px; padding: 8px 10px; }
    .kt-table td { font-size: 14px; padding: 10px; }
    .kt-pagination .page-btn { min-width: 40px; height: 40px; } /* touch-friendly */
    .kt-filter-bar { padding: 10px 12px; }
    .kt-filter-bar input { font-size: 16px; } /* prevents iOS zoom */
    .pdf-viewer-panel { display: none; } /* hide PDF on mobile */
    .kt-step .step-label { font-size: 10px; white-space: normal; text-align: center; }
    .pipeline-timeline { padding-left: 24px; }
}
@media (max-width: 480px) {
    .kt-card { padding: 14px; border-radius: 10px; }
    .kt-kpi-card .kpi-value { font-size: 28px; }
    .kt-kpi-card { padding: 12px 14px; }
    .kt-badge { font-size: 11px; padding: 3px 8px; }
}

/* ── Pipeline Live Timeline ──────────────────────────────────────────── */
.pipeline-timeline {
    position: relative;
    padding-left: 32px;
}
.pipeline-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E8E8E8;
}
.pipeline-timeline .timeline-step {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.pipeline-timeline .timeline-step::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #E8E8E8;
    background: white;
    z-index: 1;
}
.pipeline-timeline .timeline-step.done::before {
    background: #059669;
    border-color: #059669;
}
.pipeline-timeline .timeline-step.running::before {
    background: #2563EB;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.2);
    animation: pulse-dot 1.5s infinite;
}
.pipeline-timeline .timeline-step.failed::before {
    background: #DC2626;
    border-color: #DC2626;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37,99,235,0.2); }
    50% { box-shadow: 0 0 0 8px rgba(37,99,235,0.1); }
}

/* ── Toast Notifications ─────────────────────────────────────────────── */
.kt-toast {
    background: #111111;
    color: white;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}
.kt-toast.success { border-left: 4px solid #059669; }
.kt-toast.error   { border-left: 4px solid #DC2626; }
.kt-toast.info    { border-left: 4px solid #2563EB; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.kt-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Barlow', sans-serif;
}
.kt-pagination .page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #555555;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    text-decoration: none;
}
.kt-pagination .page-btn:hover { background: #F5F5F5; color: #1a1a1a; }
.kt-pagination .page-btn.active {
    background: #C10019;
    color: white;
    border-color: #C10019;
}
.kt-pagination .page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Search/Filter Bar ───────────────────────────────────────────────── */
.kt-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F5F5F5;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    padding: 8px 14px;
    transition: border-color 0.15s;
}
.kt-filter-bar:focus-within { border-color: #C10019; background: #ffffff; }
.kt-filter-bar input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    width: 100%;
}
.kt-filter-bar input::placeholder { color: #555555; }

/* ── PDF Viewer Panel ────────────────────────────────────────────────── */
.pdf-viewer-panel {
    background: #f8f8f8;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    overflow: hidden;
}
.pdf-viewer-panel iframe {
    width: 100%;
    border: none;
    background: white;
}
.pdf-viewer-panel .pdf-header {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 10px 16px;
    border-bottom: 1px solid #E8E8E8;
    background: white;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Progress Bar (linear) ───────────────────────────────────────────── */
.kt-progress-bar {
    height: 4px;
    background: #E8E8E8;
    border-radius: 99px;
    overflow: hidden;
    width: 100%;
}
.kt-progress-bar .fill {
    height: 100%;
    border-radius: 99px;
    background: #C10019;
    transition: width 0.5s ease;
}
.kt-progress-bar.animated .fill {
    animation: progress-indeterminate 1.5s infinite;
    width: 40% !important;
}
@keyframes progress-indeterminate {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ── Skeleton Loader ─────────────────────────────────────────────────── */
.kt-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
