/* ============================================================
   VIAVENDO Intranet — CI: Orange #ff6f05 · Petrol #29383d
   Rajdhani (Headlines) · Montserrat (Text)
   Dunkle Petrol-Sidebar, helle Arbeitsfläche (lesefreundlich)
   ============================================================ */

:root {
    --orange:       #ff6f05;
    --orange-soft:  #ff8f3d;
    --petrol:       #29383d;
    --petrol-deep:  #1d2a2e;
    --petrol-line:  #3d5057;
    --cyan:         #29b6c5;
    --bg:           #f2f4f5;
    --card:         #ffffff;
    --text:         #24292b;
    --text-soft:    #5b6a6f;
    --line:         #e2e7e9;
    --radius:       14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
}

.shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--petrol) 0%, var(--petrol-deep) 100%);
    color: #e8edee;
    display: flex;
    flex-direction: column;
    padding: 28px 16px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { padding: 0 10px 26px; }
.brand-mark {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 1px;
    color: #fff;
}
.brand-mark span { color: var(--orange); }
.brand-sub {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--cyan);
}

.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #c9d4d7;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
    background: var(--orange);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(255,111,5,.35);
}
.nav-icon { width: 22px; text-align: center; }

.sidebar-foot { padding: 14px 10px 0; }
.badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--petrol-line);
    color: #9fb0b5;
    text-decoration: none;
}
.badge-dev { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Content ---------- */
.content {
    flex: 1;
    padding: 36px 44px 60px;
    max-width: 1100px;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 48px;
    box-shadow: 0 2px 10px rgba(41,56,61,.05);
}
.page-foot {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-soft);
}

/* ---------- Typografie ---------- */
h1, h2, h3, h4 {
    font-family: 'Rajdhani', sans-serif;
    color: var(--petrol);
    line-height: 1.25;
    margin: 1.6em 0 .5em;
}
h1 { font-size: 34px; margin-top: 0; }
h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 10px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--orange), var(--orange-soft));
}
h2 { font-size: 25px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
h3 { font-size: 19px; }
p  { margin: .7em 0; }
a  { color: #d95c00; text-decoration: none; border-bottom: 1px solid rgba(255,111,5,.35); }
a:hover { color: var(--orange); border-bottom-color: var(--orange); }
strong { color: var(--petrol); }
hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }

ul, ol { margin: .7em 0 .7em 1.4em; }
li { margin: .3em 0; }
li.task { list-style: none; margin-left: -1.2em; }

blockquote {
    margin: 1.2em 0;
    padding: 14px 20px;
    background: #fdf3ea;
    border-left: 4px solid var(--orange);
    border-radius: 0 10px 10px 0;
    color: #6b4a2d;
}

code {
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: .88em;
    background: #eef1f2;
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--petrol);
}
.codeblock {
    background: var(--petrol-deep);
    color: #d8e2e5;
    padding: 18px 22px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.2em 0;
}
.codeblock code { background: none; color: inherit; padding: 0; }

.table-wrap { overflow-x: auto; margin: 1.2em 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-align: left;
    background: var(--petrol);
    color: #fff;
    padding: 10px 14px;
}
td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) td { background: #f8fafa; }

img { max-width: 100%; border-radius: 10px; }
.mermaid { margin: 1.4em 0; text-align: center; }

iframe.embed {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

/* ---------- Login ---------- */
.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--petrol) 0%, var(--petrol-deep) 70%);
}
.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 42px 46px;
    width: min(92vw, 380px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.login-card .brand-mark { color: var(--petrol); font-size: 30px; }
.login-card label { font-size: 13px; font-weight: 600; color: var(--text-soft); display: block; }
.login-card input {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}
.login-card button {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
}
.login-card button:hover { background: var(--orange-soft); }
.login-error { color: #c62828; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; padding: 18px 14px; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .brand { padding-bottom: 12px; }
    .content { padding: 20px 14px 40px; }
    .card { padding: 24px 20px; }
}

/* ---------- Phasen-Seiten (gemeinsamer Standard) ---------- */
.phase-hero { margin-bottom: 20px; }
.crumbs { font-size: 13px; color: var(--text-soft); margin-bottom: 12px; }
.crumbs span { margin: 0 8px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eef1f2;
    color: var(--petrol);
}
.chip-proc { background: var(--petrol); color: #fff; }

.flow { display: flex; gap: 10px; align-items: stretch; margin: 18px 0 6px; }
.flow-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px dashed var(--line);
    text-decoration: none;
    border-bottom: 1px dashed var(--line);
    min-height: 62px;
}
a.flow-card:hover { border-color: var(--orange); }
.flow-hint { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-soft); }
.flow-label { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 17px; color: var(--petrol); }
.flow-hier { background: var(--petrol); border: none; }
.flow-hier .flow-hint { color: var(--cyan); }
.flow-hier .flow-label { color: #fff; }
.flow-empty { border: none; }

.phase-lead { font-size: 16.5px; color: var(--text); max-width: 60em; margin-bottom: 8px; }
.phase-lead p { margin: .4em 0; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.info-card {
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 24px 16px;
}
.info-card.wide { grid-column: 1 / -1; }
.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--orange);
}
.card-icon { font-size: 20px; }
.info-card table { font-size: 13.5px; }
.info-card th { font-size: 12.5px; padding: 7px 10px; }
.info-card td { padding: 7px 10px; }
.info-card ul, .info-card ol { margin: .4em 0 .4em 1.2em; }
.info-card h3 { font-size: 15.5px; margin: 1em 0 .3em; }

/* Stepper (Prozess-Übersichten) */
.stepper { display: flex; align-items: stretch; gap: 6px; margin: 1.4em 0; flex-wrap: wrap; }
.step {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    border-bottom-width: 1px;
    transition: transform .12s, box-shadow .12s;
}
.step:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(41,56,61,.12); border-color: var(--orange); }
.step-nr {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: var(--orange);
    width: 24px; height: 24px;
    border-radius: 999px;
    display: grid; place-items: center;
}
.step-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 17px; color: var(--petrol); }
.step-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.step-arrow { align-self: center; color: var(--text-soft); font-size: 18px; }

@media (max-width: 980px) {
    .card-grid { grid-template-columns: 1fr; }
    .flow { flex-direction: column; }
    .stepper { flex-direction: column; }
    .step-arrow { display: none; }
}

/* ---------- Sidebar: Prozess-Untermenü ---------- */
.sidebar nav { overflow-y: auto; scrollbar-width: thin; }
.nav-group { margin-left: 14px; }
.nav-group summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    color: #b7c4c8;
    font-size: 13px;
    font-weight: 600;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::before {
    content: "▸";
    font-size: 11px;
    color: var(--cyan);
    transition: transform .15s;
}
.nav-group[open] summary::before { transform: rotate(90deg); }
.nav-group summary:hover { background: rgba(255,255,255,.06); color: #fff; }

.nav-sub { display: flex; flex-direction: column; padding: 2px 0 4px; }
.nav-sub a {
    display: block;
    padding: 5px 12px 5px 31px;
    border-radius: 8px;
    font-size: 12.5px;
    color: #a3b2b7;
    text-decoration: none;
    border-bottom: none;
}
.nav-sub a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-sub a.active {
    color: #fff;
    background: rgba(255,111,5,.28);
    font-weight: 600;
}

.nav-sub-single {
    display: block;
    margin-left: 14px;
    padding: 7px 12px 7px 31px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #b7c4c8;
    text-decoration: none;
    border-bottom: none;
    position: relative;
}
.nav-sub-single::before { content: "•"; position: absolute; left: 14px; color: var(--cyan); }
.nav-sub-single:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-sub-single.active { background: rgba(255,111,5,.28); color: #fff; }
