/* ============================================================
   Magnuscom Support – Kundenportal
   Corporate Design nach Vorbild SAP Fiori (Horizon):
   hell, funktional, hohe Informationsdichte, sparsame Akzente.

   Farbwerte 1:1 aus Logo und magnuscom.com übernommen.
   ============================================================ */
:root {
    /* --- Markenfarben --- */
    --brand:        #E96472;   /* Koralle – Logo & Website */
    --brand-dark:   #C44D5A;   /* Hover / aktive Zustände   */
    --brand-light:  #F7A9B2;
    --brand-tint:   rgba(233, 100, 114, .08);
    --brand-tint-2: rgba(233, 100, 114, .16);
    --logo-grey:    #87837D;   /* Grau der Wortmarke */

    /* --- Neutrale Töne --- */
    --ink:      #1E2024;       /* Haupttext / dunkle Flächen */
    --ink-soft: #33363C;
    --muted:    #6B6F76;       /* Sekundärtext */
    --line:     #DDE0E4;       /* Rahmen */
    --line-soft:#EAECEF;
    --shell:    #FFFFFF;       /* Kopfzeile */
    --canvas:   #F5F6F7;       /* Seitenhintergrund */
    --warm:     #F3EFEA;       /* Warmer Markenhintergrund */
    --warm-2:   #FBF9F7;
    --card:     #FFFFFF;

    /* --- Semantische Farben (SAP-Logik) --- */
    --success:  #1FA34C;
    --warning:  #C77700;
    --error:    #BB2A2A;
    --info:     #0A6ED1;

    /* --- Form --- */
    --r:      6px;             /* SAP nutzt kleine Radien */
    --r-sm:   4px;
    --sh-sm:  0 1px 2px rgba(30,32,36,.06);
    --sh:     0 2px 8px rgba(30,32,36,.08);
    --sh-md:  0 6px 20px rgba(30,32,36,.10);

    /* Systemschrift – bewusst kein Google-Font (DSGVO, keine externen Requests) */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    background: var(--canvas);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Shell Bar (Kopfzeile) ---------- */
.site-header {
    background: var(--shell);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 30;
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 30px; width: auto; display: block; }
.brand .divider { width: 1px; height: 26px; background: var(--line); flex: none; }
.brand .app-name {
    font-size: 14px; font-weight: 600; color: var(--ink);
    white-space: nowrap; letter-spacing: .1px;
}
.brand .app-name small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }

.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a {
    color: var(--ink-soft); font-weight: 500; font-size: 13.5px;
    padding: 8px 14px; border-radius: var(--r-sm);
}
.site-nav a:hover { background: var(--canvas); color: var(--ink); text-decoration: none; }
.site-nav a.active { color: var(--brand-dark); font-weight: 600; }
.site-nav a.nav-cta { border: 1px solid var(--line); margin-left: 8px; }
.site-nav a.nav-cta:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---------- Hero ---------- */
.hero {
    background: var(--warm);
    border-bottom: 1px solid var(--line-soft);
    padding: 56px 0 60px;
    position: relative;
}
.hero:after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
    height: 3px; background: var(--brand);
}
.hero .inner { max-width: 680px; }
.hero h1 {
    font-size: 34px; line-height: 1.2; margin: 0 0 12px;
    font-weight: 700; letter-spacing: -.4px; color: var(--ink);
}
.hero h1 .accent { color: var(--brand-dark); }
.hero p { font-size: 16px; color: var(--muted); margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Eyebrow / Abschnitte ---------- */
.eyebrow {
    display: inline-block; color: var(--brand-dark); font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.1px; font-size: 11px; margin-bottom: 10px;
}
.section { padding: 48px 0; }
.section-head { max-width: 700px; margin: 0 0 28px; }
.section-head h2 { font-size: 22px; margin: 0 0 8px; color: var(--ink); font-weight: 700; letter-spacing: -.2px; }
.section-head p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
    padding: 10px 20px; border-radius: var(--r-sm); border: 1px solid transparent;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    text-decoration: none; line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.btn-secondary:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-light:hover { background: var(--canvas); color: var(--ink); }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }

/* ---------- Themen-Kacheln (SAP-Tiles) ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.topic-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
    padding: 20px; box-shadow: var(--sh-sm);
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
    display: flex; flex-direction: column; gap: 8px; min-height: 168px;
    position: relative; overflow: hidden;
}
.topic-card:before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--brand); opacity: 0; transition: opacity .15s ease;
}
.topic-card:hover { border-color: var(--brand-light); box-shadow: var(--sh-md); transform: translateY(-2px); }
.topic-card:hover:before { opacity: 1; }
.topic-card .ico-wrap {
    width: 40px; height: 40px; border-radius: var(--r-sm);
    background: var(--brand-tint); color: var(--brand-dark);
    display: grid; place-items: center; margin-bottom: 4px;
}
.topic-card .ico-wrap .ico { width: 21px; height: 21px; }
.topic-card h3 { margin: 0; font-size: 15px; color: var(--ink); font-weight: 600; }
.topic-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; line-height: 1.45; }
.topic-card .go { color: var(--brand-dark); font-weight: 600; font-size: 12.5px; margin-top: 4px; }

/* ---------- Karten & Formulare ---------- */
.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r); box-shadow: var(--sh-sm); padding: 28px;
}
.card-lg { max-width: 780px; }
.card-head { border-bottom: 1px solid var(--line-soft); padding-bottom: 16px; margin-bottom: 22px; }
.card h1 { margin: 0 0 4px; color: var(--ink); font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.card .lead { color: var(--muted); margin: 0; font-size: 14px; }

.form-section {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--muted); padding-bottom: 8px; margin: 24px 0 14px;
    border-bottom: 1px solid var(--line-soft);
}
.form-section:first-of-type { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 600; color: var(--ink-soft); font-size: 12.5px; }
label .req { color: var(--brand-dark); }
.input, .select, .textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line);
    border-radius: var(--r-sm); font-size: 14px; font-family: inherit;
    background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.input:hover, .select:hover, .textarea:hover { border-color: #B9BDC3; }
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint-2);
}
.textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.hint { font-size: 12px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* ---------- Status-Badges (SAP Object Status) ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
    border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Meldungen (MessageStrip) ---------- */
.flash-stack {
    position: fixed; top: 72px; right: 24px; z-index: 60;
    display: flex; flex-direction: column; gap: 8px; max-width: 380px;
}
.flash {
    padding: 11px 15px; border-radius: var(--r-sm); box-shadow: var(--sh-md);
    font-size: 13.5px; background: #fff; border: 1px solid var(--line);
    border-left: 3px solid var(--muted); animation: slideIn .2s ease;
}
.flash.success { border-left-color: var(--success); }
.flash.error   { border-left-color: var(--error); }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- Sicherheitsprüfung (Captcha) ---------- */
.captcha-box { margin-bottom: 18px; }
.captcha-box .g-recaptcha, .captcha-box .h-captcha, .captcha-box .cf-turnstile { margin-bottom: 8px; }
.captcha-notice { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.captcha-notice a { color: var(--muted); text-decoration: underline; }
.captcha-notice a:hover { color: var(--brand-dark); }

/* ---------- Hinweisleiste (MessageStrip) ---------- */
.msgstrip {
    display: flex; gap: 10px; padding: 12px 15px; border-radius: var(--r-sm);
    font-size: 13.5px; border: 1px solid var(--line); background: var(--warm-2);
}
.msgstrip.info { background: rgba(10,110,209,.06); border-color: rgba(10,110,209,.25); }
.msgstrip.warn { background: rgba(199,119,0,.07); border-color: rgba(199,119,0,.3); }

/* ---------- Ticket-Ansicht (Kundenportal) ---------- */
.ticket-meta {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px;
    padding: 16px 0; border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft); margin: 18px 0 22px;
}
.ticket-meta span {
    display: block; font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px;
}
.ticket-meta strong { font-size: 14px; color: var(--ink); font-weight: 600; }

.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 14px 16px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.msg.from-agent { background: var(--brand-tint); border-color: rgba(233,100,114,.28); }
.msg .msg-head {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.msg .msg-head strong { color: var(--ink); font-weight: 600; }
.msg-body { font-size: 14px; line-height: 1.55; }

/* ---------- Referenz-Anzeige ---------- */
.ref-box {
    font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: 1px;
    background: var(--warm); border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: var(--r-sm); padding: 16px 20px; display: inline-block;
}

/* ---------- Info-Leiste ---------- */
.cta-strip {
    background: var(--ink); color: #fff; border-radius: var(--r); padding: 26px 28px;
    display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta-strip h2 { color: #fff; margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.cta-strip p { color: #A8ACB3; margin: 0; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #fff; border-top: 1px solid var(--line);
    color: var(--muted); padding: 24px 0; margin-top: 56px; font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .hero { padding: 40px 0 44px; }
    .hero h1 { font-size: 26px; }
    .form-grid { grid-template-columns: 1fr; }
    .site-nav a:not(.nav-cta) { display: none; }
    .card { padding: 20px; }
    .brand .app-name { display: none; }
    .brand .divider { display: none; }
    .container { padding: 0 16px; }
}
