/* ============================================================================
 * modern.css — behutsame optische Auffrischung (Overlay über Bootstrap +
 * style2.css). Aendert KEIN Markup; wird als letztes Stylesheet geladen und
 * gewinnt daher die Kaskade. Ziel: moderne Typografie, ruhige Farben, Karten
 * mit weichen Schatten, klare Tabellen/Formulare — ohne die Struktur der
 * Alt-Anwendung anzutasten.
 * ========================================================================== */

:root {
    --brand:        #1f9d55;   /* Markengruen, etwas ruhiger als das Alt-Gruen */
    --brand-dark:   #17803f;
    --brand-soft:   #e8f6ee;
    --ink:          #1f2937;   /* Fliesstext */
    --muted:        #64748b;
    --bg:           #f1f5f9;   /* Seitenhintergrund */
    --surface:      #ffffff;
    --border:       #e2e8f0;
    --navbar:       #17251d;   /* dunkles Gruen-Anthrazit */
    --navbar-2:     #1e3128;
    --radius:       10px;
    --shadow:       0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.06);
    --shadow-lg:    0 8px 28px rgba(16,24,40,.12);
}

/* ── Grundlagen ─────────────────────────────────────────────────────────── */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: 2rem; margin-bottom: .6em; }
h2 { font-size: 1.5rem; }

a { color: var(--brand-dark); }
a:hover, a:focus { color: var(--brand); }

.main-container { margin-top: 28px; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar.navbar-inverse,
.navbar-inverse {
    background: linear-gradient(180deg, var(--navbar-2), var(--navbar)) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(16,24,40,.15);
}
.navbar-inverse .navbar-brand,
.navbar-brand {
    color: #fff !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.navbar-inverse .navbar-nav > li > a {
    color: #d7e5dd !important;
    border-radius: 8px;
    margin: 6px 2px;
    padding-top: 8px;
    padding-bottom: 8px;
    transition: background .15s ease, color .15s ease;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
    color: #fff !important;
    background: rgba(255,255,255,.10) !important;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid transparent;
    transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary, .btn-success {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(31,157,85,.25);
}
.btn-primary:hover, .btn-success:hover,
.btn-primary:focus, .btn-success:focus {
    background: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
    color: #fff !important;
}
.btn-default, .btn-secondary {
    background: #fff !important;
    border-color: var(--border) !important;
    color: var(--ink) !important;
}
.btn-default:hover, .btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}
.btn-danger { border-radius: 8px; }

/* ── Karten / Panels ────────────────────────────────────────────────────── */
.panel, .website_config, .well {
    background: var(--surface);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
}
.panel-heading {
    border-top-left-radius: var(--radius) !important;
    border-top-right-radius: var(--radius) !important;
    background: #f8fafc !important;
    border-bottom: 1px solid var(--border) !important;
    font-weight: 600;
}

/* ── Formulare ──────────────────────────────────────────────────────────── */
.form-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(31,157,85,.15);
}
.input-group-addon {
    border-radius: 8px 0 0 8px;
    background: #f8fafc;
    border-color: var(--border);
}

/* ── Tabellen ───────────────────────────────────────────────────────────── */
.table, .files_table, .rechungen_einsaetze, .anfrage-table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table > thead > tr > th,
.files_table th, .rechungen_einsaetze th {
    background: #f1f5f9 !important;
    color: #334155 !important;
    font-weight: 600;
    border-bottom: 1px solid var(--border) !important;
    text-transform: none;
}
.table > tbody > tr > td,
.files_table td, .rechungen_einsaetze td {
    border-top: 1px solid #eef2f6 !important;
    vertical-align: middle;
}
.table > tbody > tr:hover { background: var(--brand-soft) !important; }

/* ── Startseiten-Icons (interner Bereich) ───────────────────────────────── */
.main-icons {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 10px 12px;
    box-shadow: var(--shadow);
    transition: transform .12s ease, box-shadow .12s ease;
    text-align: center;
}
.main-icons:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--surface) !important;   /* Alt-Hover (blau) neutralisieren */
    border-radius: 14px;
}
.main-icons a { color: var(--ink); font-weight: 600; }
.main-icons a:hover { color: var(--brand-dark); }

/* ── Hinweise / Alerts ──────────────────────────────────────────────────── */
.alert { border-radius: var(--radius); border: 1px solid transparent; }
.alert-success { background: var(--brand-soft); border-color: #bce6cd; color: #14532d; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }

/* ── Blättern (Pagination aus style2) ───────────────────────────────────── */
.seiten-container { border-radius: var(--radius); border-color: var(--border); }
.btn-seiten {
    background: #fff; color: var(--ink); border: 1px solid var(--border);
    border-radius: 8px;
}
.btn-seiten:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* ── Startseite: Hero mit Hintergrundgrafik + Illustration ──────────────── */
.jumbotron.hero-band {
    background: #eaf4ee url('../img/hero-bg.svg') center center / cover no-repeat;
    border: 1px solid #dcece2;
    border-radius: 16px;
    padding: 44px 40px;
    margin-top: 8px;
    box-shadow: var(--shadow);
}
.hero-band .row { display: flex; flex-wrap: wrap; align-items: center; }
.hero-band h1 { font-size: 2.4rem; margin-bottom: .5em; }
.hero-band .hero-text > p { font-size: 1.12rem; color: #33413a; max-width: 42ch; }
.hero-band .hero-text .btn { margin: 6px 8px 6px 0; }
.hero-media { text-align: center; }
.hero-art { max-width: 100%; height: auto; }
@media (max-width: 767px) {
    .hero-band { padding: 28px 22px; }
    .hero-media { margin-top: 18px; }
}
.features { margin-top: 26px; }
.features h2 { font-size: 1.35rem; }

/* ── Profilbild rund ────────────────────────────────────────────────────── */
.profilbild img, .profilbild { border-radius: 12px; }

/* ── Kalender (caleandar-Widget) ────────────────────────────────────────── */
.cld-day.today .cld-number {
    background: var(--brand) !important;   /* "heute" im Markengruen statt Grau */
    color: #fff !important;
}
.today .cld-number.eventday,
.cld-number.eventday {
    border-color: var(--brand) !important; /* Tage mit Terminen gruen umrandet */
    color: var(--brand-dark) !important;
}

/* ── Chat-Blasen (Nachrichten) ──────────────────────────────────────────── */
.chatnachricht {
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: none;
    max-width: 78%;
}
.chatnachrichtUser  { background: var(--brand-soft); }
.chatnachrichtAdmin { background: #eef2f7; }
