/* ==========================================================================
   SearchlyFlow Dashboard — Basis: Layout, Header, Sidebar, Navigation, Karten, Tabellen, Buttons, Formulare
   Aus dashboard.css (Legacy, siehe dashboard.legacy.css) herausgeloest.
   Lade-Reihenfolge in index.html beachten: Kaskade bleibt dadurch identisch.
   ========================================================================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f6fb;
    color: #111827;
}

.header {
    background: #0f172a;
    color: white;
    padding: 1px 20px;
}

.header h1 {
    margin: 0;
    font-size: 28px;
}

.app-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.app-layout {
    position: relative;
}

.sidebar,
.main-content,
.sidebar-toggle {
    transition:
        width 0.2s ease,
        min-width 0.2s ease,
        max-width 0.2s ease,
        flex-basis 0.2s ease,
        left 0.2s ease;
}

.sidebar-toggle {
    position: absolute;
    top: 12px;
    left: 228px;
    z-index: 50;

    width: 24px !important;
    min-width: 24px !important;
    height: 36px !important;
    min-height: 36px !important;

    padding: 0 !important;
    border: 1px solid #334155 !important;
    border-radius: 0 8px 8px 0 !important;

    background: #111827 !important;
    color: #cbd5e1 !important;

    font-size: 28px !important;
    font-weight: 300 !important;
    line-height: 32px !important;

    text-align: center;
    cursor: pointer !important;
    box-shadow: none !important;
}

.sidebar-toggle:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    transform: none !important;
}

.app-layout.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    max-width: 0;
    flex-basis: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

.app-layout.sidebar-collapsed .main-content {
    max-width: 100vw;
}

.app-layout.sidebar-collapsed .sidebar-toggle {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 240px;
    background: #111827;
    color: white;
    padding: 24px 18px;
    box-sizing: border-box;
}

.sidebar-title {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nav-btn {
    display: block;
    width: calc(100% + 12px);
    margin-left: -20px;
    text-align: left;
    background: transparent;
    color: #cbd5e1;
    border: 0;
    padding: 12px 6px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 6px;
	margin-left: -6px
    font-weight: 700 !important;
}

.nav-btn:hover,
.nav-btn.active {
    background: #1e293b;
    color: white;
}

.nav-group {
    width: 100%;
}

.nav-submenu {
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.25s ease,
        opacity 0.18s ease,
        margin 0.18s ease;
}

.nav-submenu.open {
    max-height: 420px;
    opacity: 1;
    margin-top: 6px;
    margin-bottom: 12px;
}

.nav-group > .nav-btn {
    position: relative;
}

.nav-group > .nav-btn::after {
    content: "›";
    position: absolute;
    right: 8px;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.nav-group > .nav-btn.group-open::after {
    transform: rotate(90deg);
}

.sub-btn {
    font-size: 13px !important;
    padding: 9px 6px 9px 42px !important;
    opacity: 0.9;
    font-weight: 500 !important;
}

.sub-btn:hover,
.sub-btn.active {
    opacity: 1;
}

.main-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100vw - 240px);
}

.container {
    padding: 20px 20px;
    max-width: 100%;
    box-sizing: border-box;
	background: #fff;
}

.controls {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
	background: #f8fafc;
    border: 1px solid #e2e8f0;
	border-radius: 18px;
    padding: 20px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.controls input {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    min-width: 260px;
}

.controls button {
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #0080ff;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.controls input,
.controls select {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    min-width: 260px;
    min-height: 43px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    box-sizing: border-box;
}

.controls input:focus,
.controls select:focus {
    border-color: #0080ff;
    box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.12);
}

.admin-assignment-controls {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr auto;
    gap: 12px;
    align-items: center;
}

@media (max-width: 900px) {
    .admin-assignment-controls {
        grid-template-columns: 1fr;
    }
}
.admin-assignment-controls select,
.admin-assignment-controls input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.admin-assignment-controls select:focus,
.admin-assignment-controls input:focus {
    border-color: #0080ff;
    box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.12);
}

.admin-assignment-controls button {
    min-height: 42px;
    white-space: nowrap;
}


.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    .stats {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (min-width: 1100px) {
    .stats {
        grid-template-columns: repeat(4, minmax(220px, 1fr));
    }
}

.card {
    background: white;
    border-radius: 18px;
    padding: 20px;
	margin-bottom: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.card .label {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
}

.card .label1 {
    color: #111827;
    font-size: 14px;
    margin-bottom: 0px;
	padding-top: 4px;
    font-weight: 700;
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
}

.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
}

.kpi-trend.up {
    background: #dcfce7;
    color: #166534;
}

.kpi-trend.down {
    background: #fee2e2;
    color: #991b1b;
}

.kpi-trend.neutral {
    background: #e5e7eb;
    color: #374151;
}

.kpi-hint {
    color: #64748b;
    font-weight: 600;
}

.card .value {
    font-size: 28px;
    font-weight: bold;
}

.card .value1 {
    font-size: 16px;
    font-weight: bold;
}

.recommendation-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    border-left: 5px solid #0080ff;

    box-shadow:
        0 2px 6px rgba(0,0,0,0.06);
}

.recommendation-card.warning {
    border-left-color: #f59e0b;
}

.recommendation-card.info {
    border-left-color: #0080ff;
}

.recommendation-type {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    color: #64748b;
    margin-bottom: 6px;
}
