@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600&display=swap');

/****** FARBPALETTE ******/
:root {
    --pastellblau: #A8DADC;
    --hellmintgruen: #B8E0D2;
    --sanftes-lavendel: #D4C2FC;
    --zartes-tuerkis: #9AD3BC;
    --puderrosa: #F4C2C2;
    --blassgelb: #FBE7A1;
    --hellkoralle: #F8AFA6;
    --salbeigruen: #C1D3B4;
    --cremeweiss: #FDFDFD;
    --taubenblau: #B0C4DE;
    --pfirsich: #FBD4C5;
    --zartlila: #E1D5F7;
    --vanille: #FAECCC;
    --sandbeige: #EDE0D4;
    --pastellgrau: #D3D3D3;
    --meergruen: #A9DFBF;
    --eisblau: #DCEFF5;
    --apricot: #FFD6A5;
    --lindgruen: #E3F2C1;
    --himmelblau: #B2E1FF;
    --satt-blau: #457B9D;
    --satt-tuerkis: #1D7874;
    --satt-gruen: #4CAF50;
    --satt-rot: #E63946;
    --satt-orange: #F77F00;
    --satt-lila: #6A0572;
    --satt-pink: #D72638;
    --satt-gelb: #F5B700;
    --satt-dunkelblau: #023047;
    --satt-dunkelgruen: #2A9D8F;
    --schwarz: #212121;
    --dunkelgrau: #424242;
    --mittelgrau: #757575;
    --hellgrau: #BDBDBD;
    --sehr-hellgrau: #E0E0E0;

    --button-primary: var(--satt-tuerkis);
    --button-secondary: var(--satt-orange);
    --button-danger: var(--satt-rot);
    --button-success: var(--satt-gruen);
    --button-text: var(--cremeweiss);
}

/*********** BODY & SCHRIFT ***********/
body, input, select, textarea, button {
    font-family: 'Mulish', sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fb;
    color: #222;
}
h1, h2, h3, h4 {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    color: #333;
    margin-top: 0.6em;
    margin-bottom: 0.7em;
}
section { margin-bottom: 2.1em; }
hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--satt-dunkelblau), transparent);
    margin: 30px 0;
    opacity: 0.8;
}

/*********** NAVBAR ***********/
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #267bbe;
    color: #fff;
    padding: 0.8em 2em;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.09);
    max-width: 100vw;
    overflow-x: hidden;
}

.navbar .brand {
    font-weight: bold;
    font-size: 1.3em;
    letter-spacing: 1px;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    margin-right: 2em;
    cursor: default;
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}
.navbar-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.6em;
    font-weight: 500;
    font-size: 1.08em;
    padding: 8px 0;
    transition: opacity 0.18s, border-bottom 0.14s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.navbar-links a.active, .navbar-links a:hover {
    border-bottom: 2px solid #e9f1fa;
    opacity: 0.85;
    text-decoration: none;
}

/* Logout-Button in Navbar als Link stylen */
.logout-form {
    margin: 0;
    padding: 0;
    display: inline;
}
.logout-link {
    color: #fff;
    text-decoration: none;
    margin-left: 1.6em;
    font-weight: 500;
    font-size: 1.08em;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.18s, border-bottom 0.14s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-family: inherit;
    display: inline-block;
}
.logout-link:hover,
.logout-link:focus {
    border-bottom: 2px solid #e9f1fa;
    opacity: 0.85;
    background: none;
    outline: none;
}


/* Dropdown Menü */
.dropdown {
    position: relative;
    margin-left: 1.2em;
}
.dropbtn {
    background: none;
    color: #fff;
    border: none;
    font-size: 1.08em;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    transition: background 0.13s;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    min-width: 170px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(30,60,120,0.13);
    border-radius: 7px;
    z-index: 2000;
    padding: 0.6em 0;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px);}
    to   { opacity: 1; transform: translateY(0);}
}
.dropdown-content a,
.dropdown-content button[type="submit"] {
    display: block;
    color: #267bbe;
    background: none;
    border: none;
    padding: 10px 18px;
    text-align: left;
    text-decoration: none;
    width: 100%;
    font-family: inherit;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
    border-radius: 0;
}
.dropdown-content a:hover,
.dropdown-content button[type="submit"]:hover {
    background: #f1f7fd;
    color: #1d7874;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

/* Fix: verhindert Rausrutschen rechts */
.navbar, .navbar-links {
    box-sizing: border-box;
    max-width: 100vw;
    overflow-x: auto;
}

/************* Responsive Navbar *************/
@media (max-width: 900px) {
    .navbar {
        padding: 0.6em 0.6em;
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-links {
        margin-left: 0;
        flex-wrap: wrap;
    }
    .navbar-links a, .dropdown {
        margin-left: 1em;
        font-size: 1em;
    }
    .spacer {
        height: 110px;
    }
}
@media (max-width: 600px) {
    .navbar { padding: 0.55em 0.2em; }
    .navbar .brand { font-size: 1em; }
    .spacer { height: 80px; }
}

/********* ALERT / STATUS BOXEN *********/
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-weight: 500;
    border-left: 4px solid transparent;
}

/* Farbvarianten */
.alert--danger {
    background-color: rgba(230, 57, 70, 0.15);
    color: var(--satt-rot);
    border-left-color: var(--satt-rot);
}

.alert--warning {
    background-color: rgba(247, 127, 0, 0.15);
    color: var(--satt-orange);
    border-left-color: var(--satt-orange);
}

.alert--info {
    background-color: rgba(69, 123, 157, 0.15);
    color: var(--satt-blau);
    border-left-color: var(--satt-blau);
}

.alert--success {
    background-color: rgba(76, 175, 80, 0.15);
    color: var(--satt-gruen);
    border-left-color: var(--satt-gruen);
}

.alert--neutral {
    background-color: rgba(29, 120, 116, 0.15);
    color: var(--satt-tuerkis);
    border-left-color: var(--satt-tuerkis);
}

.alert--pink {
    background-color: rgba(215, 38, 56, 0.15);
    color: var(--satt-pink);
    border-left-color: var(--satt-pink);
}

.alert--secondary {
    background-color: rgba(106, 5, 114, 0.15);
    color: var(--satt-lila);
    border-left-color: var(--satt-lila);
}


/*********** BUTTONS ***********/
.button {
    display: inline-block;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 10px 22px;
    font-size: 15px;
}
.button-primary   { background: var(--button-primary); color: var(--button-text);}
.button-secondary { background: var(--button-secondary); color: var(--button-text);}
.button-danger    { background: var(--button-danger); color: var(--button-text);}
.button-success   { background: var(--button-success); color: var(--button-text);}
.button:hover     { opacity: 0.91; }
.button span      { position: relative; z-index: 1; }

/* Action-Buttons in Tabellen */
.action-btn {
    display: inline-block;
    padding: 0.38em 1.15em;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1em;
    margin-right: 0.4em;
    color: #fff;
    font-weight: 500;
    transition: background 0.17s, color 0.14s, opacity 0.14s;
    box-shadow: 0 1px 3px rgba(30,60,120,0.06);
}
.action-btn.view    { background: #2a9d8f; }
.action-btn.edit    { background: #e9c46a; color: #222;}
.action-btn.delete  { background: #e63946; }
.action-btn:hover   { opacity: 0.83; }

/*********** CARD ELEMENTE ***********/
.card {
    background: var(--sehr-hellgrau);
    border: 1px solid var(--hellgrau);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.19);
}
.card-header { font-size: 18px; font-weight: bold; color: var(--satt-dunkelblau);}
.card-details { color: var(--dunkelgrau); font-size: 15px; line-height: 1.6;}
.card-status { font-weight: bold; color: var(--satt-gruen);}
.card-status.inaktiv { color: var(--satt-rot);}
.card-actions { display: flex; gap: 10px; margin-top: 15px; }

/* Flex Card Container für Dashboards */
.flex-card-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin: 30px 0;
}
.flex-card {
    background: var(--sehr-hellgrau);
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    flex: 1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.flex-card:hover { transform: translateY(-10px);}
.flex-card i { font-size: 40px; color: var(--satt-tuerkis); }

/*********************** TABELLEN **************************/
.table-wrap, .table-wrapper {
    overflow-x: auto;
    margin-top: 25px;
    max-width: 100%;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 2em;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(50,80,130,0.08);
}
th, td {
    padding: 0.88em 1.2em;
    text-align: left;
}
th {
    background: var(--satt-dunkelblau);
    color: var(--cremeweiss);
    text-transform: uppercase;
    font-weight: 600;
}
tr:nth-child(even) { background: #f9fbfd;}
table tr:hover { background: var(--sehr-hellgrau); }

/************* Layout: Hauptbereich & Sidebar *************/
.spacer {
    height: 80px; /* Gibt dem Hauptinhalt ausreichend Platz nach der festen Navbar */
}

.main-layout {
    display: flex;
    align-items: flex-start;
    gap: 2.7em;
    margin: 2.2em 3vw;
}
.dashboard-content {
    flex: 1 1 68%;
    min-width: 0;
    margin-right: 1.5em;
}

/* === Sidebar Styling === */
.actions-sidebar {
    flex: 0 0 270px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(30,60,120,0.09);
    padding: 2em 1.4em 2em 1.4em;
    margin-left: auto;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.actions-sidebar h4 {
    margin-top: 0;
    margin-bottom: 1.3em;
    color: #2277b9;
    font-size: 1.18em;
    letter-spacing: 0.5px;
}
.actions-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9em;
}
.actions-sidebar li { margin: 0; }
.actions-sidebar a {
    display: block;
    background: #f1f7fd;
    color: #267bbe;
    padding: 0.73em 1.2em;
    border-radius: 7px;
    font-weight: 600;
    font-size: 1.09em;
    text-decoration: none;
    box-shadow: 0 1px 5px rgba(30,60,120,0.09);
    border-left: 4px solid #dbeafe;
    letter-spacing: 0.1px;
    transition: 
        background 0.14s, 
        color 0.14s, 
        box-shadow 0.17s,
        border-left 0.14s;
}
.actions-sidebar a:hover {
    background: #267bbe;
    color: #fff;
    border-left: 4px solid #2277b9;
    box-shadow: 0 3px 11px rgba(30,60,120,0.13);
    text-decoration: none;
}

/* Responsive: Sidebar unter Content */
@media (max-width: 1100px) {
    .main-layout { flex-direction: column; gap: 1.5em; margin: 1.5em 1vw; }
    .dashboard-content { margin-right: 0;}
    .actions-sidebar { position: static; width: 100%; margin-left: 0; margin-top: 2em; }
}
@media (max-width: 600px) {
    .navbar { flex-direction: column; align-items: flex-start; padding: 0.6em 0.5em; }
    .main-layout { margin: 0.7em 0.2em; gap: 1em;}
    .actions-sidebar { padding: 1em 0.2em; }
    .overview-box, .box { padding: 1.1em 0.6em;}
    th, td { padding: 0.75em 0.4em;}
}


.form-wrap {
    width: 100%;
}

.form-group {
    margin-bottom: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-weight: 500;
    color: #222;
    margin-bottom: 0.2rem;
    font-size: 1.09rem;
    letter-spacing: 0.01em;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    padding: 0.5rem 0.8rem;
    border-radius: 0.7rem;
    border: 1.5px solid #ccd3db;
    background: #f6f8fb;
    font-size: 1.09rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    border-color: #2877c9;
    background: #f3faff;
}

.action-btn.save {
    margin-top: 1.3rem;
    width: 100%;
    padding: 0.7rem;
    font-size: 1.13rem;
    border: none;
    border-radius: 1.1rem;
    background: #2877c9;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px #2877c930;
    transition: background 0.18s, box-shadow 0.18s;
}
.action-btn.save:hover,
.action-btn.save:focus {
    background: #155b99;
    box-shadow: 0 3px 16px #2877c940;
}

/* Nur damit du sofort siehst, wie es wirkt! Füge das in styles.css ein für dauerhaft */
    .dashboard-content > .edit-section {
        display: flex;
        align-items: flex-start;
        gap: 3.5rem;
        padding-top: 2rem;
        padding-left: 2rem;
    }
    .dashboard-content h2 {
        min-width: 210px;
        margin-top: 0.7rem;
    }
    .form-card {
        max-width: 500px;
        width: 100%;
        background: #fff;
        border-radius: 1.5rem;
        box-shadow: 0 6px 32px #0001;
        padding: 2.2rem 2.7rem 2.2rem 2.7rem;
        margin-bottom: 1.5rem;
    }
    @media (max-width: 950px) {
        .dashboard-content > .edit-section {
            flex-direction: column;
            gap: 1.2rem;
            padding-left: 1rem;
            padding-right: 1rem;
        }
        .form-card {
            max-width: 100%;
            padding: 1.2rem 0.7rem;
        }
    }

	/* ==== SETTINGS FORM STYLES ==== */

form.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 800px;
    margin-top: 1rem;
}

form.form-inline .form-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
}

form.form-inline label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #333;
}

form.form-inline input,
form.form-inline select {
    padding: 0.55rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

form.form-inline input:focus,
form.form-inline select:focus {
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 123, 204, 0.2);
    outline: none;
}

form.form-inline h3 {
    flex-basis: 100%;
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: #444;
}

form.form-inline hr {
    border: none;
    height: 1px;
    background-color: #ddd;
    width: 100%;
    margin: 1rem 0;
}

/* ==== BUTTON ==== */

.action-btn.save {
    background-color: #007acc;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
}

.action-btn.save:hover {
    background-color: #005fa3;
}

/* ==== MESSAGE BOXES ==== */



        .dashboard-stats { display: flex; gap: 1rem; margin-bottom: 2rem; }
        .stat-card { background: #f6f7f9; border-radius: 12px; padding: 1rem 2rem; box-shadow: 0 1px 8px #ccc3; min-width: 160px; }
        .stat-card.highlight-warning { background: #fffbe5; border: 1px solid #ffe37f; }
        .stat-card span { font-size: 2rem; font-weight: bold; }
        .dashboard-widget { background: #eef2f7; border-radius: 12px; padding: 1rem 2rem; margin-bottom: 2rem; }
        .dashboard-reminders ul { list-style: none; padding: 0; }
        .dashboard-reminders li { margin-bottom: 0.6em; padding: 0.3em 0.8em; border-radius: 7px; }
        .dashboard-reminders .bald_faellig { background: #fffbe6; border-left: 4px solid #ffeb3b; }
        .dashboard-reminders .ueberfaellig { background: #ffeaea; border-left: 4px solid #f44336; }
        .car-mileage-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
        .car-mileage-form select, .car-mileage-form input { min-width: 200px; }
		.car-mileage-form select,
.car-mileage-form input[type="number"] {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.car-mileage-form select:focus,
.car-mileage-form input[type="number"]:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
    outline: none;
}

.car-mileage-form button[type="submit"] {
    padding: 0.5rem 1.2rem;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.car-mileage-form button[type="submit"]:hover {
    background-color: #005fa3;
}

.tooltip {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

/* Tooltip-Box */
.tooltip-box {
    position: absolute;
    max-width: 240px;
    background: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(5px);
}

/* Sichtbar */
.tooltip-box.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip-Pfeil */
.tooltip-box::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Pfeil bei Position oben (Tooltip unten) */
.tooltip-box[data-position="bottom"]::after {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent #1a1a1a transparent;
}

/* Pfeil bei Position unten (Tooltip oben) */
.tooltip-box[data-position="top"]::after {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-color: #1a1a1a transparent transparent transparent;
}



