/* user_styles.css 
   Zentrales Stylesheet für das Grefrath / Glehn Projekt 2026
   Vereinheitlichung von Internetauftritt und Admin-Dashboards
*/

/* 1. VARIABLEN & BASIS-SETUP */
:root { 
    --primary: #1E5631;
    --accent: #00B368;
    --bg: #F0F2F5;
    --card: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --orange: #f39c12;
    --blue-accent: #3498db;
    --green-light: #00B368;
    --danger: #dc3545;
    --red: #dc2626;
    --amber: #FFFBEB;
}

* { box-sizing: border-box; }

body { 
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background-color: var(--bg); 
    color: var(--text); 
    line-height: 1.6; 
    margin: 0; 
    padding: 0; 
}

/* 2. HEADER-SYSTEM */
/* Standardisierter 60px Sticky Header für Admin-Dashboards & Unterseiten */
.header { 
    background: var(--primary); 
    color: white; 
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.header.header-centered {
    justify-content: center;
}

.header h1, .header h2 { 
    margin: 0; 
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    line-height: 1.2;
    border-top: none;
    padding-top: 0;
}

.nav-link, .back-btn {
    color: white; 
    text-decoration: none; 
    border: 1px solid rgba(255,255,255,0.5);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: bold;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.nav-link:hover, .back-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Hero / Banner Header für die öffentliche Landingpage */
.hero-header {
    background: var(--primary);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

/* 3. LAYOUT & CONTAINER */
.container {
    padding: 20px; 
    max-width: 900px;
    margin: auto; 
}

.container-small {
    max-width: 650px;
}

.section-title {
    font-size: 0.8em;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    margin: 25px 0 10px 5px;
    letter-spacing: 0.5px;
}

/* 4. KARTEN, GRIDS & DETAIL-FELDER */
.card, .doc-card, .faq-card, .contact-card {
    background: var(--card); 
    padding: 20px; 
    border-radius: 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    margin-bottom: 20px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.card-header {
    padding: 12px 15px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 15px; 
}

.detail-grid {
    display: grid; 
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .full-width { grid-column: span 2; }
}

.label {
    font-size: 0.65em;
    font-weight: bold;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.val {
    font-size: 0.95em;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    display: block;
    word-break: break-word;
    border: 1px solid #f0f0f0;
    min-height: 1.2em;
}

.doc-card h2 {
    color: var(--primary);
    font-size: 1.4em;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

/* 5. AKKORDEONS & LISTE-IN-LISTE */
.kat-header {
    background: white; 
    padding: 15px; 
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.dept-header, .entry-header {
    background: #f8fafc;
    padding: 12px 15px; 
    border-radius: 12px;
    display: flex; 
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
    transition: background 0.2s, border-color 0.2s;
}

.dept-header:hover, .entry-header:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.kat-content {
    display: none;
}

.kat-content.active {
    display: block;
}

/* 6. KACHELN & GRID-SYSTEM */
.grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

.tile, .menu-card {
    background: white; 
    padding: 22px 15px;
    border-radius: 20px; 
    text-align: center; 
    text-decoration: none; 
    color: var(--text); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    transition: transform 0.1s, background 0.1s;
    position: relative;
}

.tile:active, .menu-card:active {
    transform: scale(0.96);
    background: #fafafa;
}

.full-card {
    grid-column: span 2;
}

.tile .icon, .menu-card i {
    font-size: 2.2em;
    margin-bottom: 10px; 
    font-style: normal;
    display: block;
}

.tile .label, .menu-card span {
    font-weight: bold; 
    font-size: 0.9em; 
}

.tile.empty {
    opacity: 0.6; 
    filter: grayscale(1); 
    pointer-events: none; 
}

/* 7. BADGES & STATUS-INDIKATOREN */
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f0f0f0;
    color: #666;
    font-size: 0.75em;
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: bold;
}

.type-badge {
    background: #eee;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    color: #666;
}

.b-live { background: var(--accent); color: white; }
.b-wait { background: var(--orange); color: white; }

.pending-done { background: var(--accent) !important; color: white !important; border: none !important; }
.pending-work { background: #333 !important; color: white !important; animation: pulse-shadow 2s infinite; border: none !important; }

@keyframes pulse-shadow {
    0% { box-shadow: 0 0 0 0 rgba(51, 51, 51, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(51, 51, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(51, 51, 51, 0); }
}

/* 8. FORMULARE & INPUTS */
label, .mode-label {
    display: block; 
    font-size: 0.7em; 
    font-weight: bold; 
    color: #999; 
    text-transform: uppercase; 
    margin-top: 12px;
    margin-bottom: 5px;
}

input[type="text"], input[type="email"], input[type="number"], input[type="url"], input[type="password"], select, textarea, .mode-select, .push-input {
    width: 100%; 
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px; 
    font-size: 0.95em;
    box-sizing: border-box; 
    background: #ffffff;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(30, 86, 49, 0.2);
}

/* 9. BUTTON-SYSTEM */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.9em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save, .btn-action, .btn-push {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-save:hover, .btn-action:hover, .btn-push:hover {
    background: #143d22;
}

.btn-edit, .btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-edit:hover, .btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: var(--red);
    color: white; 
}

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

.actions-bar, .actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.logout-btn {
    display: block; 
    text-align: center; 
    margin-top: 30px;
    color: var(--red);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold; 
    padding-bottom: 40px;
}

/* 10. LIGHTBOX OVERLAY */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
}

/* 11. FOOTER */
footer {
    background-color: white;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid #eaeaea;
    text-align: center; 
}

.footer-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-nav a {
    color: var(--text-light);
    text-decoration: none; 
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 12. STATUS & BENACHRICHTIGUNGSMELDUNGEN */
.msg {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 12px;
    text-align: center; 
    font-size: 0.85em;
    margin-bottom: 20px;
    border: 1px solid #bbf7d0;
}

.err {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.85em;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
}
