/* ============================================
   Projekt: Watt'n Service Kundenportal
   Datei: assets/style.css
   Autor: Markus Stephan Fischer
   Stand: 07.03.2026
   Hinweis: Design im Stil des Watt'n Service Logos
            (Grüne Akzente, heller Hintergrund)
   ============================================ */

/* ============ Grundlayout ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Padding + Border gehören zur Breite */
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f6f5; /* Sehr helles Grau mit Grünstich */
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

/* ============ Header ============ */
header {
    background: #4a7c59; /* Grünton passend zum Logo */
    color: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo links, Nav rechts */
}

header .logo {
    height: 50px; /* Logo-Höhe */
    width: auto;
}

header .header-title {
    font-size: 1.4rem;
    font-weight: bold;
    flex: 1; /* Nimmt verfügbaren Platz */
    margin-left: 1rem;
}

header .header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

header .header-nav a,
header .header-nav .btn-small {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2); /* Halbtransparent */
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

header .header-nav a:hover,
header .header-nav .btn-small:hover {
    background: rgba(255,255,255,0.3);
}

/* ============ Main Content ============ */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Login-Box */
.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 450px;
    margin: 0 auto;
}

.login-box h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: #4a7c59; /* Grün */
}

.login-box p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Dashboard-Box */
.dashboard-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dashboard-box h1 {
    color: #4a7c59;
    margin-bottom: 1.5rem;
}

/* Projekt-Kacheln */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive */
    gap: 1.5rem;
    margin-top: 1rem;
}

.project-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(74,124,89,0.2); /* Grüner Schatten beim Hover */
}

.project-card h3 {
    color: #4a7c59;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: #666;
    margin-bottom: 1rem;
}

/* ============ Formulare ============ */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: #4a7c59; /* Grün bei Fokus */
    box-shadow: 0 0 0 2px rgba(74,124,89,0.2);
}

button,
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #4a7c59; /* Grün */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

button:hover,
.btn:hover {
    background: #3a6349; /* Dunkleres Grün */
}

.btn-danger {
    background: #c44; /* Rot für Löschen */
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #a33;
}

/* ============ Meldungen ============ */
.error,
.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 600;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Hinweistext */
.hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.hint a {
    color: #4a7c59;
    text-decoration: none;
}

.hint a:hover {
    text-decoration: underline;
}

/* ============ Admin-Bereich ============ */
.admin-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-box h1 {
    color: #4a7c59;
    margin-bottom: 1.5rem;
}

/* Statistik-Karten */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.stat-card h3 {
    font-size: 2rem;
    color: #4a7c59;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Admin-Menü */
.admin-menu {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Admin-Formular */
.admin-form {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.admin-form h3 {
    margin-bottom: 1rem;
    color: #4a7c59;
}

.admin-form input,
.admin-form select {
    margin-bottom: 1rem;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #4a7c59;
    color: #fff;
    font-weight: 600;
}

table tr:hover {
    background: #f9f9f9;
}

/* ============ Footer ============ */
footer {
    background: #4a7c59;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    font-size: 0.9rem;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header .header-nav {
        margin-top: 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr; /* Einzelne Spalte auf Mobilgeräten */
    }
}
