/* ====== ATS Design-System (intern) ============================================
   Tokens + App-Shell. Bootstrap bleibt Basis (Grid, Utilities), Optik kommt von hier. */

:root {
    --ink: #1c2430;
    --muted: #64748b;
    --bg: #f3f5f8;
    --surface: #ffffff;
    --border: #e4e8ef;
    --accent: #0e7a6e;
    --accent-ink: #0a5b52;
    --accent-soft: #e4f1ef;
    --sidebar: #17212d;
    --sidebar-ink: #c7d0dc;
    --ok: #157f3d;      --ok-soft: #e3f4e9;
    --danger: #b42318;  --danger-soft: #fcebea;
    --warn: #9a6700;    --warn-soft: #fff3d6;
    --info: #175cd3;    --info-soft: #e8f0fd;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14.5px;
}

h1, h2, h3, .h3 { font-weight: 650; letter-spacing: -.01em; color: var(--ink); }

/* ---------- App-Shell: Sidebar + Topbar ---------- */
.app { display: flex; min-height: 100vh; }

.app-sidebar {
    width: 218px; flex-shrink: 0;
    background: var(--sidebar);
    color: var(--sidebar-ink);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.app-brand {
    display: flex; align-items: center; gap: .6rem;
    padding: 1.1rem 1.15rem .9rem;
    color: #fff; font-weight: 700; font-size: 1.02rem; text-decoration: none;
    letter-spacing: .01em;
}
.app-brand:hover { color: #fff; }
.app-brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 4px rgba(14,122,110,.25); }

.app-nav { padding: .4rem .65rem; display: flex; flex-direction: column; gap: 2px; }
.app-nav a {
    display: flex; align-items: center; gap: .65rem;
    padding: .55rem .7rem;
    color: var(--sidebar-ink); text-decoration: none;
    border-radius: 8px; font-weight: 500;
}
.app-nav a svg { width: 17px; height: 17px; opacity: .75; flex-shrink: 0; }
.app-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav a.active { background: rgba(14,122,110,.22); color: #fff; }
.app-nav a.active svg { opacity: 1; }

.app-sidebar .sidebar-foot {
    margin-top: auto; padding: .9rem 1.15rem;
    font-size: .72rem; color: #5c6b7c;
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.topbar .page-title { font-weight: 650; font-size: 1.05rem; margin: 0; }

.content { padding: 1.4rem 1.5rem 2.5rem; }

@media (max-width: 900px) {
    .app { flex-direction: column; }
    .app-sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
    .app-nav { flex-direction: row; }
    .app-sidebar .sidebar-foot { display: none; }
}

/* ---------- Panels, Tabellen, Badges ---------- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.panel .panel-head {
    padding: .8rem 1.1rem; border-bottom: 1px solid var(--border);
    font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.panel .panel-body { padding: 1.1rem; }

.table-modern { width: 100%; border-collapse: collapse; }
.table-modern th {
    text-align: left; padding: .65rem 1.1rem;
    font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
    color: var(--muted); border-bottom: 1px solid var(--border);
    background: #fafbfc;
}
.table-modern td { padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover td { background: #f7f9fb; }
.table-modern a { color: var(--accent-ink); font-weight: 550; text-decoration: none; }
.table-modern a:hover { text-decoration: underline; }

.badge-soft { display: inline-block; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.1; }
.badge-soft.ok      { background: var(--ok-soft); color: var(--ok); }
.badge-soft.danger  { background: var(--danger-soft); color: var(--danger); }
.badge-soft.warn    { background: var(--warn-soft); color: var(--warn); }
.badge-soft.info    { background: var(--info-soft); color: var(--info); }
.badge-soft.neutral { background: #eef1f5; color: var(--muted); }
.badge-soft.accent  { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Buttons (Bootstrap-Überschreibungen) ---------- */
.btn { border-radius: 8px; font-weight: 550; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-outline-primary { color: var(--accent-ink); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); }
.form-control, .form-select { border-radius: 8px; border-color: var(--border); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(14,122,110,.15); }

/* ---------- Dashboard-Kacheln ---------- */
.stat-tile {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1rem 1.15rem;
}
.stat-tile .label { font-size: .74rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat-tile .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.stat-tile .value.accent { color: var(--accent-ink); }

/* ---------- Timeline (Bewerbungs-Detail) ---------- */
.timeline { position: relative; }
.timeline .tl-item { position: relative; padding-left: 1.4rem; padding-bottom: 1.05rem; }
.timeline .tl-item::before {
    content: ""; position: absolute; left: 4px; top: 8px; bottom: -4px;
    width: 2px; background: var(--border);
}
.timeline .tl-item:last-child::before { display: none; }
.timeline .tl-item::after {
    content: ""; position: absolute; left: 0; top: 5px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--surface); border: 2.5px solid var(--accent);
}
.timeline .tl-time { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Syncfusion Kanban-Feinschliff ---------- */
.e-kanban { background: transparent !important; }
.e-kanban .e-kanban-header .e-header-cells {
    background: transparent; border: none; padding: 0 .45rem .4rem;
}
.e-kanban .e-header-cells .e-header-text {
    font-size: .74rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.e-kanban .e-kanban-content .e-content-cells {
    background: #eceff4; border: none !important; border-radius: var(--radius); padding: .45rem;
}
.e-kanban .e-card {
    border: 1px solid var(--border) !important; border-radius: 8px !important;
    box-shadow: var(--shadow) !important;
}
.e-kanban .e-card:hover { border-color: var(--accent) !important; }
.kanban-card .name { font-weight: 600; }
.kanban-card .meta { font-size: .76rem; color: var(--muted); }

/* Kanban: nie quetschen – ab Mindestbreite horizontal scrollen */
#kanban { overflow-x: auto; }
.e-kanban .e-kanban-table { min-width: 1150px; }
.e-kanban .e-card .e-card-content { padding: 0 !important; }

/* ---------- Avatare ---------- */
.avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: inline-grid; place-items: center;
    font-size: .78rem; font-weight: 650; color: #fff; letter-spacing: .02em;
}
.avatar.lg { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .62rem; }
.av-0 { background: #0e7a6e; } .av-1 { background: #175cd3; }
.av-2 { background: #b54708; } .av-3 { background: #7f56d9; }
.av-4 { background: #c11574; } .av-5 { background: #3538cd; }
.av-6 { background: #087443; } .av-7 { background: #b42318; }

.name-cell { display: flex; align-items: center; gap: .65rem; }

/* ---------- Filterleiste ---------- */
.filter-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-bar .search { max-width: 300px; }
.chip {
    border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    border-radius: 999px; padding: .3rem .85rem; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Phasenverteilung (Dashboard) ---------- */
.stage-dist .row-line { display: flex; align-items: center; gap: .8rem; margin-bottom: .55rem; }
.stage-dist .lbl { width: 9.5rem; font-size: .84rem; color: var(--muted); flex-shrink: 0; }
.stage-dist .bar { flex: 1; height: 10px; background: #eceff4; border-radius: 999px; overflow: hidden; }
.stage-dist .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.stage-dist .cnt { width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .86rem; }

/* Kanban-Karte v2 */
.kanban-card { display: flex; gap: .6rem; align-items: flex-start; }
.kanban-card .days { font-size: .7rem; color: var(--muted); background: #eef1f5; border-radius: 999px; padding: .1rem .5rem; margin-top: .25rem; display: inline-block; }

/* ---------- Detailkopf + Phasen-Stepper ---------- */
.detail-head { padding: 1.15rem 1.25rem .9rem; }
.detail-head .who { display: flex; gap: .95rem; align-items: center; }
.detail-head h1 { font-size: 1.25rem; margin: 0; }
.detail-head .sub { color: var(--muted); font-size: .9rem; }
.detail-head .contact-row { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .35rem; font-size: .86rem; }
.detail-head .contact-row a { color: var(--accent-ink); text-decoration: none; }
.detail-head .contact-row a:hover { text-decoration: underline; }

.stepper { display: flex; gap: 4px; margin-top: 1rem; }
.stepper form { flex: 1; display: flex; }
.stepper button {
    flex: 1; border: none; cursor: pointer;
    padding: .5rem .3rem; font-size: .78rem; font-weight: 600;
    background: #eceff4; color: var(--muted);
    transition: background .1s ease;
}
.stepper form:first-child button { border-radius: 8px 0 0 8px; }
.stepper form:last-child button { border-radius: 0 8px 8px 0; }
.stepper button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.stepper .done button { background: var(--accent-soft); color: var(--accent-ink); }
.stepper .current button { background: var(--accent); color: #fff; }
.stepper.disabled button { cursor: default; opacity: .55; }

.meta-list { font-size: .86rem; }
.meta-list .row-line { display: flex; justify-content: space-between; gap: 1rem; padding: .34rem 0; border-bottom: 1px dashed var(--border); }
.meta-list .row-line:last-child { border-bottom: none; }
.meta-list .k { color: var(--muted); }

.file-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; }
.file-row .icon { width: 30px; height: 30px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: .68rem; font-weight: 700; flex-shrink: 0; }

/* Kopier-Buttons an Kontaktdaten */
.copy-btn { border: none; background: none; color: var(--muted); cursor: pointer; padding: 0 .2rem; font-size: .85rem; }
.copy-btn:hover { color: var(--accent-ink); }

/* Foto-Avatare */
img.avatar-img { object-fit: cover; background: #eceff4; }
