:root {
    --orange: #E87722;
    --dunkel: #1a1a1a;
    --grau: #2b2b2b;
    --hellgrau: #f4f4f4;
    --text: #222;
    --rand: #e3e3e3;
    --karte: #fff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--hellgrau);
    color: var(--text);
}

.kopf {
    background: linear-gradient(180deg, #232323 0%, var(--dunkel) 100%);
    color: #fff;
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.kopf-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: .3px;
    text-decoration: none;
}
.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #f6a45a, var(--orange));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}
.logo-akz { color: var(--orange); }

.kopf nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1 1 auto;
}
.kopf nav a {
    color: #e6e6e6;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 13px;
    border-radius: 7px;
    transition: background .15s, color .15s;
}
.kopf nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.kopf nav a.aktiv { color: #fff; background: rgba(232,119,34,.9); }

.suche-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    padding: 3px 4px 3px 14px;
}
.suche-form input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    width: 130px;
}
.suche-form input::placeholder { color: #b9b9b9; }
.suche-form button {
    background: var(--orange);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}
.abmelden a { color: #bdbdbd; font-size: 0.8rem; text-decoration: none; }
.abmelden a:hover { color: var(--orange); }

.inhalt {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

h1 { color: var(--dunkel); border-bottom: 3px solid var(--orange); padding-bottom: 8px; }

.login-seite {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--dunkel);
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.login-box h1 { border: none; font-size: 1.4rem; }
.login-box h1 span { color: var(--orange); }
.login-box label {
    display: block;
    margin: 14px 0 4px;
    font-size: 0.85rem;
}
.login-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login-box button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: var(--orange);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}
.login-box button:hover { background: #cf6710; }
.fehlermeldung { color: #c0392b; font-size: 0.85rem; }

.listen-tabelle {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
.listen-tabelle th, .listen-tabelle td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.9rem;
}
.listen-tabelle th { background: var(--dunkel); color: white; }
.listen-tabelle tr:nth-child(even) { background: #fafafa; }

.seiten-inhalt { background: white; padding: 24px; border-radius: 6px; }
.seiten-inhalt img { max-width: 100%; height: auto; border-radius: 4px; }
.seiten-inhalt figure { margin: 16px 0; }
.seiten-inhalt figcaption { font-size: 0.85rem; color: #666; margin-top: 4px; }
.seiten-banner { margin: -24px -24px 24px; }
.seiten-banner img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 6px 6px 0 0; }

.fuss {
    max-width: 1100px;
    margin: 48px auto 24px;
    padding: 16px 24px 0;
    border-top: 1px solid #ddd;
    font-size: 0.8rem;
}
.fuss a {
    color: #666;
    text-decoration: none;
    margin-right: 18px;
}
.fuss a:hover { color: var(--orange); }

/* ---------------------------------------------------------------------------
   Aus SharePoint rekonstruierte Webpart-Komponenten
   (Hero, Quicklinks, Schaltflaechen, Links, Trennlinie). Muss synchron bleiben
   mit COMPONENT_CSS in import_seiten_zu_pocketbase.py.
--------------------------------------------------------------------------- */
.rte { margin: 16px 0; line-height: 1.6; }
hr.sp-divider { border: 0; border-top: 1px solid var(--rand); margin: 28px 0; }

/* SharePoint-Rich-Text-Klassen (Schriftgroessen, Farben, Hervorhebungen) */
.fontSizeMediumPlus { font-size: 1.25em; }
.fontSizeLarge { font-size: 1.5em; }
.fontSizeXLarge { font-size: 2em; }
.fontSizeXLargePlus { font-size: 2.5em; }
.fontColorThemePrimary { color: var(--orange); }
.fontColorYellow, .fontColorYellowLight { color: #ffd54a; }
.highlightColorYellow { background-color: #fff3a3; padding: 0 2px; }
.highlightColorGrey { background-color: #eee; padding: 0 2px; }

/* Hero: grosse Kachel-Karten */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.hero-card { display: flex; flex-direction: column; background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
a.hero-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.hero-card-media { aspect-ratio: 16/9; background: #eee; overflow: hidden; }
.hero-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.hero-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hero-card-body h3 { margin: 0; font-size: 1.05rem; color: var(--dunkel); }
.hero-card-cta { color: var(--orange); font-size: .9rem; font-weight: 600; margin-top: auto; }

/* Quicklinks: kompakte Kacheln */
.quicklinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.quicklink { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.quicklink:hover { border-color: var(--orange); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.quicklink img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.quicklink-icon { width: 40px; height: 40px; border-radius: 6px; flex: none; background: var(--orange); opacity: .15; }
.quicklink-titel { font-weight: 600; font-size: .95rem; }

/* Schaltflaeche */
.sp-button-wrap { margin: 16px 0; text-align: center; }
.sp-button { display: inline-block; padding: 10px 22px; background: var(--orange); color: #fff; border-radius: 6px; text-decoration: none; font-weight: 600; transition: filter .15s; }
.sp-button:hover { filter: brightness(.92); }

/* Link-Eintrag */
.sp-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 6px 0; background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; text-decoration: none; color: inherit; transition: border-color .15s; }
.sp-link:hover { border-color: var(--orange); }
.sp-link-icon { width: 18px; height: 22px; flex: none; border: 1px solid var(--orange); border-radius: 2px; background: linear-gradient(135deg, #fff 60%, var(--orange) 60%); }

/* ---------------------------------------------------------------------------
   Dokumente-Ordneransicht
--------------------------------------------------------------------------- */
.brotkrumen { font-size: .85rem; margin-bottom: 8px; color: #666; }
.brotkrumen a { color: var(--orange); text-decoration: none; }
.brotkrumen a:hover { text-decoration: underline; }
.brotkrumen span { margin: 0 4px; }
.brotkrumen .aktuell { color: #666; }
.ordner-liste { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; }
.ordner-liste a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.ordner-liste a:hover { border-color: var(--orange); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ordner-liste .ol-icon { font-size: 1.1rem; flex: none; }
.ordner-liste .ol-name { font-weight: 600; flex: 1; word-break: break-word; }
.ordner-liste .ol-meta { font-size: .8rem; color: #888; flex: none; white-space: nowrap; }
.ordner-liste .ist-ordner .ol-name { color: var(--dunkel); }
.leer-hinweis { color: #888; font-style: italic; }
