*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
min-height: 100vh;
height: auto;

}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #020617;
    color: #e5eaff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../img/Background.png") center center no-repeat;
    background-size: cover;   /* Bild über gesamte Fläche skalieren */
    opacity: 0.12;            /* Helligkeit des Bildes */
    pointer-events: none;     /* Klicks gehen durch */
    height: 100%;
}


/* LAYOUT */

.layout {
    min-height: 100vh;
    display: flex;
}

/* MAIN */
.action-card {
    backdrop-filter: blur(6px);
}

.main {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* HEADER */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.main-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.main-header p {
    font-size: 0.88rem;
    color: rgba(199, 210, 254, 0.9);
}

.main-header-company {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 8px 12px;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.main-header-company span {
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.75rem;
}

.main-header-company strong {
    font-size: 0.9rem;
}

/* KPI-GRID */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.kpi-card {
    background: rgba(10, 12, 24, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(120, 144, 255, 0.35);
    padding: 14px 16px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.7);
}

.kpi-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.9);
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.kpi-sub {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.85);
}

/* HOME-ACTIONS */

.home-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.action-card {
    background: rgba(10, 12, 24, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(120, 144, 255, 0.35);
    padding: 16px 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-header h2 {
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.action-card p {
    font-size: 0.86rem;
    color: rgba(199, 210, 254, 0.9);
}

.action-list {
    margin: 6px 0 4px;
    padding-left: 18px;
    font-size: 0.8rem;
    color: rgba(199, 210, 254, 0.9);
}

.action-list li {
    margin-bottom: 2px;
}

/* BUTTONS */

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    margin-top: 6px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    color: #f9fafb;
    border-color: rgba(129, 140, 248, 0.9);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.6);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #1d4ed8, #4338ca);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.7);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 0.95);
}

/* Level-Fortschritt oben im Dashboard */

.level-card {
    background: rgba(10, 12, 24, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(120, 144, 255, 0.35);
    padding: 16px 18px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.7);
    margin-bottom: 18px;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.level-name {
    font-size: 1rem;
    font-weight: 600;
    color: #e3e8ff;
}

.level-percent {
    font-size: 0.85rem;
    color: rgba(200, 210, 255, 0.85);
}

.level-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(30, 41, 89, 0.9);
    overflow: hidden;
    margin-bottom: 6px;
}

.level-bar-fill {
    height: 8px;
    border-radius: 999px;
    background: #255dff;
    transition: width 0.25s ease;
}

.level-desc {
    font-size: 0.85rem;
    color: rgba(200, 210, 255, 0.9);
}

/* Responsive */

@media (max-width: 900px) {
    .main {
        padding: 16px;
    }

    h1 {
        padding-top: 2em;
    }
    .main-header-company {
        margin-top: 2em;
    }

    .home-actions {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
/* Letztes Element (Button) immer nach unten schieben -> keine Treppe mehr */
.action-card > *:last-child {
    margin-top: auto;
}
.home-actions {
    align-items: stretch; /* Grid-Items gleiche Höhe in der Zeile */
}
/* Extra Abstand unter dem mobilen Header (Burger + "Menü") */
@media (max-width: 900px) {
    header.main-header {
        margin-top: 30px;   /* hier kannst du bei Bedarf noch feinjustieren */
    }
}

    .kpi-donut-container {
        margin-top: 0.5rem;
        display: flex;
        justify-content: center;
    }

    .kpi-donut {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
    }

    .kpi-donut .donut-bg {
        fill: none;
        stroke: rgba(148, 163, 184, 0.25); /* slate-400/25 */
        stroke-width: 3;
    }

    .kpi-donut .donut-value {
        fill: none;
        stroke-width: 3;
        stroke-linecap: round;
        transform: rotate(-90deg);
        transform-origin: 50% 50%;
    }

    .kpi-donut .donut-value.completed {
        stroke: #3b82f6; /* blau */
    }

    .kpi-donut .donut-value.answered {
        stroke: #22c55e; /* grün */
    }

    .kpi-donut .donut-text {
        font-size: 9px;
        text-anchor: middle;
        dominant-baseline: central;
        fill: #e5e7eb; /* text-slate-200 */
    }

.kpi-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #93c5fd;
    text-decoration: none;
}

.kpi-link:hover {
    text-decoration: underline;
    color: #bfdbfe;
}
