/* =====================================================
   home of jobs ATS – Stylesheet
   Tokens 1:1 aus crm.homeofjobs.de (crm_style.css), Schrift Inter (lokal), durchgehend hell.
   Developed by Toni Sciacca - mail@tonisciacca.com
   ===================================================== */

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

:root {
    color-scheme: light;
    --ats-primary: #f6a200;
    --ats-primary-dark: #e09500;
    --ats-primary-darker: #c88200;
    --ats-primary-light: #fff8eb;
    --ats-primary-soft: #fff4d6;
    --ats-bg: #f8f9fb;
    --ats-white: #ffffff;
    --ats-text: #1e293b;
    --ats-text-2: #334155;
    --ats-text-light: #64748b;
    --ats-muted: #94a3b8;
    --ats-border: #e2e8f0;
    --ats-border-2: #f1f5f9;
    --ats-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --ats-shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --ats-shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --ats-radius: 12px;
    --ats-radius-sm: 8px;
    --ats-radius-xs: 6px;
    --ats-sidebar-w: 260px;
    --ats-success: #10b981;
    --ats-danger: #ef4444;
    --ats-warning: #f59e0b;
    --ats-info: #3b82f6;
    --ats-violet: #8b5cf6;
    --ats-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--ats-bg);
    color: var(--ats-text);
    font-size: 0.9rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--ats-primary-dark); text-decoration: none; transition: color var(--ats-transition); }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--ats-primary-soft); color: var(--ats-text); }
:focus-visible { outline: 2px solid var(--ats-primary); outline-offset: 2px; }
i[data-lucide], svg.lucide { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== LAYOUT ===== */
.ats-layout { display: flex; min-height: 100vh; }

.ats-sidebar {
    width: var(--ats-sidebar-w); min-width: var(--ats-sidebar-w);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    height: 100vh; position: fixed; top: 0; left: 0;
    display: flex; flex-direction: column;
    border-right: 1px solid var(--ats-border);
    z-index: 100; box-shadow: 2px 0 12px rgba(0,0,0,0.03);
}
.ats-sb-logo { display: flex; align-items: center; gap: 10px; padding: 20px 22px 16px; border-bottom: 1px solid var(--ats-border); background: var(--ats-white); }
.ats-sb-logo img { height: 35px; width: auto; display: block; }
.ats-sb-product { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: #fff; background: linear-gradient(135deg, var(--ats-primary), var(--ats-primary-dark)); padding: 3px 8px; border-radius: 99px; }

.ats-tenant { padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.ats-tenant-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ats-bg); border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); cursor: pointer; font: inherit; font-size: .82rem; color: var(--ats-text); text-align: left; }
.ats-tenant-btn:hover { border-color: #cbd5e1; background: #fff; }
.ats-tenant-btn.is-konto { background: var(--ats-primary-light); border-color: #fde2a8; }
.ats-tenant-btn i { width: 16px; height: 16px; color: var(--ats-primary-dark); }
.ats-tenant-btn .ats-tenant-chev { color: var(--ats-muted); width: 14px; height: 14px; }
.ats-tenant-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ats-tenant-static { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ats-text-light); padding: 4px 4px; }
.ats-tenant-static i { width: 14px; height: 14px; color: var(--ats-primary-dark); }
.ats-tenant .ats-dropdown { left: 14px; right: 14px; top: auto; }

.ats-sb-nav { flex: 1; overflow-y: auto; padding: 8px 10px 12px; scrollbar-width: thin; scrollbar-color: var(--ats-border) transparent; }
.ats-sb-section { padding: 16px 14px 6px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ats-muted); }
.ats-sb-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: .88rem; color: #475569; border-radius: var(--ats-radius-sm); margin: 2px 0; font-weight: 500; transition: all var(--ats-transition); }
.ats-sb-link:hover { background: var(--ats-primary-light); color: var(--ats-primary-dark); text-decoration: none; transform: translateX(2px); }
.ats-sb-link.active { background: linear-gradient(135deg, var(--ats-primary-light) 0%, var(--ats-primary-soft) 100%); color: var(--ats-primary-dark); font-weight: 600; box-shadow: 0 2px 8px rgba(246,162,0,.15); }
.ats-sb-link i { width: 18px; height: 18px; opacity: .85; }
.ats-sb-link span:not(.ats-sb-badge) { flex: 1; }
.ats-sb-sub { padding-left: 40px; font-size: .82rem; }
.ats-sb-sub i { width: 15px; height: 15px; }
.ats-sb-badge { margin-left: auto; background: linear-gradient(135deg, var(--ats-primary), var(--ats-primary-dark)); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; line-height: 1.3; box-shadow: 0 2px 6px rgba(246,162,0,.3); }
.ats-sb-badge-warn { background: linear-gradient(135deg, var(--ats-danger), #dc2626); box-shadow: 0 2px 6px rgba(239,68,68,.3); }

/* ---------- Navigation ein-/ausklappen (Verkleinern-Button -> 68px-Icon-Leiste) ---------- */
.ats-nav-btn { margin-left: auto; flex: 0 0 auto; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; color: #64748b; cursor: pointer; }
.ats-nav-btn:hover { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
.ats-nav-btn i { width: 16px; height: 16px; }
.ats-nav-auf { display: none; }
.ats-sidebar { transition: width .2s ease, min-width .2s ease; }
.ats-main { transition: margin-left .2s ease; }

html.ats-nav-mini { --ats-sidebar-w: 68px; }
html.ats-nav-mini .ats-sb-logo { padding: 16px 0 14px; justify-content: center; }
html.ats-nav-mini .ats-sb-logo a { display: none; }
html.ats-nav-mini .ats-nav-zu { display: none; }
html.ats-nav-mini .ats-nav-auf { display: flex; margin: 0 auto; }
html.ats-nav-mini .ats-tenant { padding: 8px 8px 4px; }
html.ats-nav-mini .ats-tenant-name, html.ats-nav-mini .ats-tenant-chev, html.ats-nav-mini .ats-tenant-static span, html.ats-nav-mini .ats-tenant .ats-tag { display: none; }
html.ats-nav-mini .ats-tenant-btn, html.ats-nav-mini .ats-tenant-static { justify-content: center; padding: 8px; }
html.ats-nav-mini .ats-sb-nav { padding: 8px 8px 12px; }
html.ats-nav-mini .ats-sb-section { font-size: 0; padding: 12px 0 4px; }
html.ats-nav-mini .ats-sb-section::after { content: ""; display: block; height: 1px; background: var(--ats-border); margin: 0 14px; }
html.ats-nav-mini .ats-sb-link { justify-content: center; padding: 10px 0; gap: 0; }
html.ats-nav-mini .ats-sb-link:hover { transform: none; }
html.ats-nav-mini .ats-sb-link span:not(.ats-sb-badge) { display: none; }
html.ats-nav-mini .ats-sb-badge { display: none; }
html.ats-nav-mini .ats-sb-sub { display: none; }
.ats-sb-user { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--ats-border); background: #fafbfc; color: var(--ats-text); }
.ats-sb-user:hover { text-decoration: none; background: var(--ats-primary-light); }
.ats-sb-user-txt { display: flex; flex-direction: column; min-width: 0; }
.ats-sb-user-name { font-weight: 600; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ats-sb-user-role { font-size: .72rem; color: var(--ats-primary-dark); font-weight: 600; }

.ats-main { margin-left: var(--ats-sidebar-w); flex: 1; padding: 0 36px 28px; min-height: 100vh; min-width: 0; display: flex; flex-direction: column; }
.ats-main > .ats-footer { margin-top: auto; }

.ats-topbar { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; margin-bottom: 14px; background: linear-gradient(180deg, var(--ats-bg) 75%, rgba(248,249,251,0)); }
.ats-search-trigger { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 440px; padding: 9px 14px; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); color: var(--ats-muted); font: inherit; font-size: .85rem; cursor: pointer; box-shadow: var(--ats-shadow); }
.ats-search-trigger:hover { border-color: #cbd5e1; }
.ats-search-trigger span { flex: 1; text-align: left; }
kbd { font-family: inherit; font-size: .68rem; font-weight: 600; color: var(--ats-text-light); background: var(--ats-bg); border: 1px solid var(--ats-border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
.ats-topbar-right { display: flex; align-items: center; gap: 8px; }
.ats-quick { position: relative; }
.ats-icon-btn { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: 50%; color: var(--ats-text-light); cursor: pointer; box-shadow: var(--ats-shadow); transition: all var(--ats-transition); }
.ats-icon-btn:hover { color: var(--ats-primary-dark); border-color: #fde2a8; }
.ats-user-btn { padding: 0; overflow: hidden; }
.ats-dot-badge { position: absolute; top: -4px; right: -4px; background: var(--ats-danger); color: #fff; font-size: .6rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; }

.ats-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .76rem; color: var(--ats-muted); padding: 28px 2px 0; }
.ats-footer a { color: var(--ats-text-light); }

/* ===== DROPDOWN ===== */
.ats-dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; max-height: 420px; overflow-y: auto; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); box-shadow: var(--ats-shadow-lg); z-index: 300; padding: 6px; }
.ats-dropdown.open { display: block; animation: atsFade .15s ease; }
.ats-dropdown-right { left: auto; right: 0; }
.ats-dropdown.ats-dropdown-float { z-index: 2500; top: auto; animation: none; }
.ats-dd-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ats-muted); padding: 8px 10px 6px; }
.ats-dd-head { padding: 10px 12px; border-bottom: 1px solid var(--ats-border); margin-bottom: 4px; display: flex; flex-direction: column; }
.ats-dd-head small { color: var(--ats-text-light); font-size: .76rem; }
.ats-dd-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; font: inherit; font-size: .85rem; color: var(--ats-text); text-align: left; border-radius: var(--ats-radius-xs); cursor: pointer; }
.ats-dd-item:hover { background: var(--ats-primary-light); color: var(--ats-primary-dark); text-decoration: none; }
.ats-dd-item i { width: 16px; height: 16px; color: var(--ats-text-light); }
.ats-dd-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ats-dd-item small { font-size: .7rem; color: var(--ats-muted); }
.ats-dd-item.is-active { background: var(--ats-primary-light); font-weight: 600; }
.ats-dd-item.is-danger { color: var(--ats-danger); }
.ats-dd-item.is-danger i { color: var(--ats-danger); }
.ats-dd-sep { height: 1px; background: var(--ats-border); margin: 5px 4px; }
.ats-dd-foot { border-top: 1px solid var(--ats-border); margin-top: 4px; border-radius: 0; }
.ats-dd-empty { padding: 16px 12px; color: var(--ats-muted); font-size: .84rem; text-align: center; }
.ats-notif-dd { width: 360px; }
.ats-notif { display: flex; gap: 10px; padding: 10px; border-radius: var(--ats-radius-xs); color: var(--ats-text); }
.ats-notif:hover { background: var(--ats-bg); text-decoration: none; }
.ats-notif.is-unread { background: var(--ats-primary-light); }
.ats-notif i { color: var(--ats-primary-dark); margin-top: 2px; }
.ats-notif strong { display: block; font-size: .84rem; }
.ats-notif small { color: var(--ats-text-light); font-size: .76rem; }

/* ===== PAGE HEADER ===== */
.ats-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.ats-crumbs { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--ats-muted); margin-bottom: 6px; flex-wrap: wrap; }
.ats-crumbs a { color: var(--ats-text-light); display: inline-flex; }
.ats-crumbs i { width: 14px; height: 14px; }
.ats-page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; color: var(--ats-text); }
.ats-page-subtitle { font-size: .88rem; color: var(--ats-text-light); margin-top: 3px; }

/* ===== CARDS ===== */
.ats-card { background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); padding: 22px; box-shadow: var(--ats-shadow); }
.ats-card + .ats-card { margin-top: 18px; }
.ats-grid > .ats-card + .ats-card, .ats-kpis > .ats-card + .ats-card { margin-top: 0; }
.ats-card-title { font-size: .95rem; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ats-card-title i { color: var(--ats-primary); width: 19px; height: 19px; }
.ats-card-title .ats-right { margin-left: auto; font-weight: 500; }
.ats-card-flush { padding: 0; overflow: hidden; }
.ats-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ats-border); flex-wrap: wrap; }
.ats-card-head h3 { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ats-card-head h3 i { color: var(--ats-primary); }
.ats-section-title { font-size: 1.02rem; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.ats-section-title:first-child { margin-top: 0; }
.ats-section-title small { font-weight: 500; color: var(--ats-text-light); font-size: .82rem; }

.ats-grid { display: grid; gap: 18px; }
.ats-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ats-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ats-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ats-grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.ats-stack > * + * { margin-top: 18px; }

/* KPI-Kacheln */
.ats-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.ats-kpi { position: relative; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); padding: 18px 20px; box-shadow: var(--ats-shadow); display: flex; align-items: center; gap: 16px; color: var(--ats-text); overflow: hidden; transition: all var(--ats-transition); }
a.ats-kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ats-shadow-lg); }
.ats-kpi::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--ats-primary); opacity: 0; transition: opacity var(--ats-transition); }
a.ats-kpi:hover::before { opacity: 1; }
.ats-kpi-icon { width: 46px; height: 46px; border-radius: var(--ats-radius-sm); display: flex; align-items: center; justify-content: center; background: var(--ats-primary-light); color: var(--ats-primary-dark); flex-shrink: 0; }
.ats-kpi-icon i { width: 22px; height: 22px; }
.ats-kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.ats-kpi-label { font-size: .8rem; color: var(--ats-text-light); }
.ats-kpi-trend { font-size: .74rem; font-weight: 600; margin-left: 6px; }
.ats-kpi-trend.up { color: var(--ats-success); }
.ats-kpi-trend.down { color: var(--ats-danger); }
.ats-kpi.blue .ats-kpi-icon { background: #eff6ff; color: var(--ats-info); }
.ats-kpi.green .ats-kpi-icon { background: #ecfdf5; color: var(--ats-success); }
.ats-kpi.violet .ats-kpi-icon { background: #f5f3ff; color: var(--ats-violet); }
.ats-kpi.red .ats-kpi-icon { background: #fef2f2; color: var(--ats-danger); }

/* ===== FLASH / TOAST / BANNER ===== */
.ats-flash { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: var(--ats-radius-sm); margin-bottom: 18px; font-size: .88rem; font-weight: 500; animation: atsSlide .3s ease; transition: all .3s ease; }
.ats-flash-success { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #065f46; border: 1px solid #a7f3d0; }
.ats-flash-error { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #991b1b; border: 1px solid #fecaca; }
.ats-flash-info { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #1e40af; border: 1px solid #bfdbfe; }
.ats-flash-warn { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #92400e; border: 1px solid #fde68a; }
.ats-banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--ats-radius-sm); font-size: .82rem; font-weight: 500; margin-bottom: 16px; }
.ats-banner-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.ats-banner-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.ats-toasts { position: fixed; bottom: 22px; right: 22px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.ats-toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 16px; background: var(--ats-white); border: 1px solid var(--ats-border); border-left: 4px solid var(--ats-success); border-radius: var(--ats-radius-sm); box-shadow: var(--ats-shadow-lg); font-size: .86rem; animation: atsSlideUp .25s ease; }
.ats-toast.error { border-left-color: var(--ats-danger); }
.ats-toast.info { border-left-color: var(--ats-info); }
.ats-toast i { color: var(--ats-success); }
.ats-toast.error i { color: var(--ats-danger); }
@keyframes atsSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes atsSlideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes atsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes atsSpin { to { transform: rotate(360deg); } }
.ats-spin { animation: atsSpin 1s linear infinite; }

/* ===== FORMULARE ===== */
.ats-form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 14px; }
.ats-col-12 { grid-column: span 12; } .ats-col-9 { grid-column: span 9; } .ats-col-8 { grid-column: span 8; }
.ats-col-6 { grid-column: span 6; } .ats-col-4 { grid-column: span 4; } .ats-col-3 { grid-column: span 3; } .ats-col-2 { grid-column: span 2; }
.ats-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ats-field-label { font-size: .78rem; font-weight: 600; color: var(--ats-text-2); }
.ats-field-label .req { color: var(--ats-danger); }
.ats-field-hint { font-size: .74rem; color: var(--ats-text-light); }
.ats-input { width: 100%; padding: 9px 12px; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); font: inherit; font-size: .88rem; color: var(--ats-text); background: var(--ats-white); transition: border-color var(--ats-transition), box-shadow var(--ats-transition); }
.ats-input:focus { outline: none; border-color: var(--ats-primary); box-shadow: 0 0 0 4px rgba(246,162,0,.12); }
.ats-input::placeholder { color: var(--ats-muted); }
.ats-input:disabled, .ats-input[readonly] { background: var(--ats-bg); color: var(--ats-text-light); }
textarea.ats-input { resize: vertical; min-height: 84px; line-height: 1.5; }
select.ats-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
select[multiple].ats-input { background-image: none; padding-right: 12px; min-height: 90px; }
.ats-input-sm { padding: 6px 10px; font-size: .8rem; width: auto; }
.ats-input-group { display: flex; gap: 8px; align-items: center; }
.ats-input-group > .ats-input { flex: 1; }
.ats-check { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; cursor: pointer; user-select: none; }
.ats-check input { width: 16px; height: 16px; accent-color: var(--ats-primary); cursor: pointer; }
.ats-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ats-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .86rem; }
.ats-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ats-switch .ats-slider { width: 36px; height: 20px; background: #cbd5e1; border-radius: 99px; position: relative; transition: background var(--ats-transition); flex-shrink: 0; }
.ats-switch .ats-slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform var(--ats-transition); }
.ats-switch input:checked + .ats-slider { background: var(--ats-primary); }
.ats-switch input:checked + .ats-slider::after { transform: translateX(16px); }
.ats-form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 16px; margin-top: 18px; border-top: 1px solid var(--ats-border); }
.ats-sticky-actions { position: sticky; bottom: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border: 1px solid var(--ats-border); border-top: 3px solid var(--ats-primary); border-radius: var(--ats-radius); padding: 12px 16px; margin-top: 18px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; box-shadow: 0 -4px 20px rgba(0,0,0,.05); }
.ats-sticky-actions .ats-left { margin-right: auto; font-size: .82rem; color: var(--ats-text-light); }
.ats-radio-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; min-height: 38px; }

/* ===== BUTTONS ===== */
.ats-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: 1px solid transparent; border-radius: var(--ats-radius-sm); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; transition: all var(--ats-transition); line-height: 1.4; white-space: nowrap; color: inherit; background: none; }
.ats-btn:hover { text-decoration: none; }
.ats-btn i { width: 17px; height: 17px; }
.ats-btn-primary { background: linear-gradient(135deg, var(--ats-primary), var(--ats-primary-dark)); color: #fff; box-shadow: 0 2px 8px rgba(246,162,0,.3); }
.ats-btn-primary:hover { background: linear-gradient(135deg, var(--ats-primary-dark), var(--ats-primary-darker)); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(246,162,0,.4); }
.ats-btn-secondary { background: var(--ats-white); color: #475569; border-color: var(--ats-border); }
.ats-btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; color: var(--ats-text); }
.ats-btn-ghost { color: var(--ats-text-light); }
.ats-btn-ghost:hover { background: var(--ats-bg); color: var(--ats-text); }
.ats-btn-danger { background: #fef2f2; color: var(--ats-danger); border-color: #fecaca; }
.ats-btn-danger:hover { background: #fee2e2; }
.ats-btn-success { background: linear-gradient(135deg, var(--ats-success), #059669); color: #fff; }
.ats-btn-sm { padding: 6px 12px; font-size: .8rem; }
.ats-btn-sm i { width: 15px; height: 15px; }
.ats-btn-xs { padding: 3px 8px; font-size: .74rem; border-radius: var(--ats-radius-xs); gap: 5px; }
.ats-btn-xs i { width: 13px; height: 13px; }
.ats-btn-icon { padding: 7px; }
.ats-btn[disabled], .ats-btn.is-disabled { opacity: .5; pointer-events: none; }
.ats-btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ats-link-btn { background: none; border: 0; color: var(--ats-primary-dark); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; padding: 0; }
.ats-link-btn:hover { text-decoration: underline; }
.ats-fab { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--ats-primary), var(--ats-primary-dark)); color: #fff; border: 0; cursor: pointer; box-shadow: 0 3px 10px rgba(246,162,0,.35); }
.ats-fab:hover { transform: translateY(-1px); color: #fff; text-decoration: none; }

/* ===== TABELLEN ===== */
.ats-table-wrap { background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); overflow-x: auto; box-shadow: var(--ats-shadow); }
.ats-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ats-table th { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); padding: 11px 14px; text-align: left; font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ats-text-light); border-bottom: 1px solid var(--ats-border); white-space: nowrap; }
.ats-table td { padding: 12px 14px; border-bottom: 1px solid var(--ats-border-2); vertical-align: middle; }
.ats-table tr:last-child td { border-bottom: 0; }
.ats-table tbody tr { transition: background var(--ats-transition); }
.ats-table tbody tr:hover td { background: #fafbfc; }
.ats-table tbody tr.is-selected td { background: var(--ats-primary-light); }
.ats-table .ats-td-check { width: 38px; }
.ats-table .ats-td-actions { white-space: nowrap; text-align: right; width: 1%; }
.ats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ats-table a.ats-row-title { font-weight: 600; color: var(--ats-text); }
.ats-table a.ats-row-title:hover { color: var(--ats-primary-dark); }
.ats-th-sort { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.ats-th-sort i { width: 12px; height: 12px; opacity: .45; }
.ats-th-sort.is-active { color: var(--ats-primary-dark); }
.ats-th-sort.is-active i { opacity: 1; }
.ats-sub { font-size: .78rem; color: var(--ats-text-light); }
.ats-cell-person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.ats-cell-person > div { min-width: 0; }
.ats-contact-icons { display: inline-flex; gap: 6px; }
.ats-round-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ats-border); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ats-text-2); }
.ats-round-btn:hover { border-color: var(--ats-primary); color: var(--ats-primary-dark); text-decoration: none; }
.ats-round-btn.is-off { opacity: .35; pointer-events: none; }
.ats-round-btn i { width: 15px; height: 15px; }

.ats-bulkbar { position: sticky; top: 70px; z-index: 60; display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; background: var(--ats-primary-light); border: 1px solid #fde2a8; border-radius: var(--ats-radius-sm); box-shadow: var(--ats-shadow); font-size: .85rem; }
.ats-bulkbar.open { display: flex; }
.ats-bulkbar strong { margin-right: 6px; }

.ats-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--ats-border); background: #fff; }
.ats-pag-info { font-size: .82rem; color: var(--ats-text-light); }
.ats-pag-info strong { color: var(--ats-text); }
.ats-pag-nav { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ats-pag-btn { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); background: #fff; color: var(--ats-text); font-size: .82rem; }
.ats-pag-btn:hover { text-decoration: none; border-color: var(--ats-primary); }
.ats-pag-btn.is-active { background: var(--ats-primary); border-color: var(--ats-primary); color: #fff; font-weight: 700; }
.ats-pag-btn.is-disabled { opacity: .4; pointer-events: none; }
.ats-pag-btn i { width: 14px; height: 14px; }

/* ===== PILLS / TAGS / BADGES ===== */
.ats-pill { --c: #64748b; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); }
.ats-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ats-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; background: var(--ats-bg); color: var(--ats-text-2); border: 1px solid var(--ats-border); white-space: nowrap; }
.ats-tag-primary { background: var(--ats-primary-light); color: var(--ats-primary-dark); border-color: #fde2a8; }
.ats-tag-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.ats-tag-green { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.ats-tag-red { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.ats-tag-blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.ats-tag-violet { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.ats-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ats-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; background: var(--ats-bg); border: 1px solid var(--ats-border); font-size: .72rem; font-weight: 700; color: var(--ats-text-light); }

.ats-avatar { --h: 30; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; font-size: .82rem; color: hsl(var(--h), 55%, 32%); background: hsl(var(--h), 70%, 92%); overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ats-border); }
.ats-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ats-avatar-sm { width: 32px; height: 32px; font-size: .74rem; }
.ats-avatar-xs { width: 36px; height: 36px; font-size: .74rem; border: 0; box-shadow: none; background: var(--ats-primary-light); color: var(--ats-primary-dark); }
.ats-avatar-lg { width: 72px; height: 72px; font-size: 1.3rem; }

.ats-stars { display: inline-flex; gap: 2px; color: #cbd5e1; }
.ats-stars i { width: 16px; height: 16px; }
.ats-stars i.on, .ats-stars svg.on { color: var(--ats-primary); fill: var(--ats-primary); }
.ats-stars.is-edit i, .ats-stars.is-edit svg { cursor: pointer; }
.ats-stars.is-edit:hover svg { color: var(--ats-primary); }
.ats-stars.is-edit svg:hover ~ svg { color: #cbd5e1; fill: none; }

.ats-match { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; }
.ats-match-bar { width: 64px; height: 6px; border-radius: 99px; background: var(--ats-border); overflow: hidden; }
.ats-match-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ef4444, #f59e0b 50%, #10b981); background-size: 64px 6px; }

/* Mehrfachauswahl */
.ats-ms { position: relative; }
.ats-ms-btn { text-align: left; min-height: 38px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.ats-ms-dd { left: 0; right: 0; min-width: 220px; }
.ats-ms-dd .ats-ms-q { width: 100%; margin-bottom: 6px; }
.ats-ms-list { max-height: 260px; overflow-y: auto; }

/* ===== FILTER-KARTE (Filter / Expertenfilter / Meine Filter) ===== */
.ats-filter { background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); box-shadow: var(--ats-shadow); margin-bottom: 18px; }
.ats-filter-tabs { display: flex; border-bottom: 1px solid var(--ats-border); overflow-x: auto; }
.ats-filter-tab { flex: 1; text-align: center; padding: 12px 16px; font-size: .84rem; font-weight: 500; color: var(--ats-text-light); border: 0; background: none; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.ats-filter-tab:hover { color: var(--ats-text); background: #fafbfc; }
.ats-filter-tab.active { color: var(--ats-primary-dark); border-bottom-color: var(--ats-primary); font-weight: 600; background: var(--ats-primary-light); }
.ats-filter-body { padding: 16px 18px; }
.ats-filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ats-filter-more { display: none; margin-top: 12px; }
.ats-filter-more.open { display: grid; }
.ats-filter-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ats-filter-foot .ats-right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ats-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ats-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border-radius: 99px; background: var(--ats-primary-light); border: 1px solid #fde2a8; color: var(--ats-primary-dark); font-size: .78rem; font-weight: 600; }
.ats-chip a { display: inline-flex; color: inherit; opacity: .7; }
.ats-chip a:hover { opacity: 1; }
.ats-chip i { width: 14px; height: 14px; }
.ats-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.ats-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; min-width: 120px; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); background: #fff; color: var(--ats-text); }
.ats-tile:hover { text-decoration: none; border-color: var(--ats-primary); }
.ats-tile.active { border-color: var(--ats-primary); background: var(--ats-primary-light); }
.ats-tile strong { font-size: 1.1rem; }
.ats-tile span { font-size: .74rem; color: var(--ats-text-light); }
.ats-expert-group { border: 1px dashed var(--ats-border); border-radius: var(--ats-radius-sm); padding: 12px; background: #fcfcfd; }
.ats-expert-rule { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .8fr) minmax(160px, 1.4fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.ats-seg { display: inline-flex; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); overflow: hidden; background: #fff; }
.ats-seg button, .ats-seg label { border: 0; background: none; font: inherit; font-size: .78rem; font-weight: 600; padding: 6px 12px; cursor: pointer; color: var(--ats-text-light); display: inline-flex; align-items: center; gap: 6px; }
.ats-seg button + button, .ats-seg label + label { border-left: 1px solid var(--ats-border); }
.ats-seg .active, .ats-seg input:checked + span { background: var(--ats-primary); color: #fff; }
.ats-seg input { display: none; }
.ats-seg label { padding: 0; }
.ats-seg label span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; }

/* ===== TABS ===== */
.ats-tabs { display: flex; gap: 0; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); box-shadow: var(--ats-shadow); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.ats-tab { flex: 1; text-align: center; padding: 13px 18px; font-size: .86rem; font-weight: 500; color: var(--ats-text-light); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.ats-tab:hover { color: var(--ats-text); background: #fafbfc; text-decoration: none; }
.ats-tab.active { color: var(--ats-primary-dark); border-bottom-color: var(--ats-primary); font-weight: 600; background: var(--ats-primary-light); }
.ats-tab i { width: 16px; height: 16px; }
.ats-tab .ats-count { height: 18px; min-width: 18px; font-size: .68rem; }
.ats-subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.ats-subtab { padding: 6px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--ats-text-light); border: 1px solid transparent; }
.ats-subtab:hover { background: #fff; border-color: var(--ats-border); text-decoration: none; }
.ats-subtab.active { background: #fff; color: var(--ats-primary-dark); border-color: #fde2a8; box-shadow: var(--ats-shadow); }

/* ===== DETAIL-KOPF (Kandidat / Stelle) ===== */
.ats-detail-head { display: grid; grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ats-person-card { display: flex; align-items: center; gap: 14px; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); padding: 14px 16px; box-shadow: var(--ats-shadow); min-width: 0; }
.ats-person-card .ats-person-name { font-weight: 700; font-size: .98rem; }
.ats-person-card .ats-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ats-action-box { position: relative; }
.ats-action-btn { width: 100%; height: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius); box-shadow: var(--ats-shadow); font: inherit; font-weight: 600; font-size: .88rem; color: var(--ats-text); cursor: pointer; text-align: left; transition: all var(--ats-transition); }
.ats-action-btn:hover { border-color: var(--ats-primary); background: var(--ats-primary-light); }
.ats-action-btn .ats-ab-icon { width: 34px; height: 34px; border-radius: var(--ats-radius-sm); background: var(--ats-primary-light); color: var(--ats-primary-dark); display: flex; align-items: center; justify-content: center; }
.ats-action-btn .ats-ab-txt { flex: 1; display: flex; flex-direction: column; }
.ats-action-btn .ats-ab-txt small { font-weight: 500; color: var(--ats-text-light); font-size: .74rem; }
.ats-action-box .ats-dropdown { left: 0; right: 0; min-width: 0; }

.ats-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ats-headline h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.ats-headline .ats-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: .82rem; color: var(--ats-text-light); }
.ats-pager { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ats-text-light); }

.ats-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px 18px; }
.ats-dl > div { min-width: 0; }
.ats-dl dt { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ats-text-light); margin-bottom: 2px; }
.ats-dl dd { font-size: .88rem; font-weight: 500; word-break: break-word; }
.ats-dl dd:empty::before { content: '–'; color: var(--ats-muted); }
.ats-mini-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; }
.ats-mini-stats a, .ats-mini-stats span { color: var(--ats-text-light); }
.ats-mini-stats strong { color: var(--ats-text); }

/* ===== TIMELINE (Historie) ===== */
.ats-tl { position: relative; }
.ats-tl-item { display: grid; grid-template-columns: 180px 36px minmax(0, 1fr); gap: 0 14px; position: relative; padding-bottom: 22px; }
.ats-tl-item::before { content: ''; position: absolute; left: 211px; top: 0; bottom: 0; width: 2px; background: var(--ats-border); }
.ats-tl-item:last-child::before { bottom: auto; height: 20px; }
.ats-tl-when { text-align: right; padding-top: 6px; }
.ats-tl-date { font-size: .78rem; font-weight: 600; color: var(--ats-text-2); }
.ats-tl-by { font-size: .74rem; color: var(--ats-text-light); }
.ats-tl-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--ats-primary-light); border: 2px solid #fff; box-shadow: 0 0 0 1px #fde2a8; color: var(--ats-primary-dark); display: flex; align-items: center; justify-content: center; }
.ats-tl-dot i { width: 16px; height: 16px; }
.ats-tl-status .ats-tl-dot { background: #eff6ff; color: var(--ats-info); box-shadow: 0 0 0 1px #bfdbfe; }
.ats-tl-email_aus .ats-tl-dot, .ats-tl-email_ein .ats-tl-dot { background: #f5f3ff; color: var(--ats-violet); box-shadow: 0 0 0 1px #ddd6fe; }
.ats-tl-notiz .ats-tl-dot { background: #fffbeb; color: #b45309; box-shadow: 0 0 0 1px #fde68a; }
.ats-tl-termin .ats-tl-dot { background: #ecfdf5; color: var(--ats-success); box-shadow: 0 0 0 1px #a7f3d0; }
.ats-tl-body { background: var(--ats-white); border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); padding: 12px 16px; box-shadow: var(--ats-shadow); min-width: 0; }
.ats-tl-title { font-weight: 600; font-size: .88rem; }
.ats-tl-meta { font-size: .76rem; color: var(--ats-text-light); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.ats-tl-meta i { width: 13px; height: 13px; }
.ats-tl-content { font-size: .85rem; color: var(--ats-text-2); margin-top: 8px; word-break: break-word; overflow-x: auto; }
.ats-tl-content p { margin-bottom: .5em; }
.ats-tl-content.is-collapsed { max-height: 150px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.ats-tl-comment { margin-top: 10px; padding: 8px 12px; background: var(--ats-bg); border-radius: var(--ats-radius-xs); font-size: .82rem; }
.ats-tl-comment span { color: var(--ats-muted); font-size: .74rem; }
.ats-tl-reply { margin-top: 8px; border: 0; background: none; font: inherit; font-size: .76rem; color: var(--ats-text-light); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.ats-tl-reply:hover { color: var(--ats-primary-dark); }
.ats-tl-reply i { width: 14px; height: 14px; }
.ats-tl-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }

/* ===== KANBAN / PIPELINE ===== */
.ats-kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start; scrollbar-width: thin; }
.ats-kanban-col { flex: 1; min-width: 250px; max-width: 320px; background: #f1f5f9; border: 1px solid var(--ats-border); border-radius: var(--ats-radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.ats-kanban-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: #fff; border-radius: var(--ats-radius) var(--ats-radius) 0 0; border-bottom: 3px solid var(--c, var(--ats-border)); font-weight: 700; font-size: .84rem; }
.ats-kanban-head span:first-child { display: flex; align-items: center; gap: 8px; }
.ats-kanban-head i { width: 16px; height: 16px; color: var(--c); }
.ats-kanban-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 120px; flex: 1; transition: background var(--ats-transition); }
.ats-kanban-body.drag-over { background: var(--ats-primary-light); }
.ats-kcard { background: #fff; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); padding: 11px 12px; cursor: grab; box-shadow: var(--ats-shadow); transition: box-shadow var(--ats-transition), border-color var(--ats-transition); }
.ats-kcard:hover { border-color: var(--ats-primary); box-shadow: var(--ats-shadow-lg); }
.ats-kcard.dragging { opacity: .5; }
.ats-kcard-top { display: flex; gap: 10px; align-items: center; }
.ats-kcard-name { font-weight: 600; font-size: .86rem; color: var(--ats-text); }
.ats-kcard-name:hover { color: var(--ats-primary-dark); text-decoration: none; }
.ats-kcard-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .74rem; color: var(--ats-text-light); }
.ats-kcard .ats-pill { font-size: .68rem; padding: 1px 8px; }

.ats-pipe { display: grid; grid-template-columns: repeat(6, minmax(58px, 1fr)); gap: 4px; min-width: 380px; }
.ats-pipe a { display: flex; flex-direction: column; align-items: center; padding: 5px 4px; border-radius: var(--ats-radius-xs); color: var(--ats-text-light); font-size: .68rem; border: 1px solid transparent; }
.ats-pipe a strong { font-size: .95rem; color: var(--c); line-height: 1.2; }
.ats-pipe a.is-zero strong { color: #cbd5e1; }
.ats-pipe a:hover { background: var(--ats-bg); border-color: var(--ats-border); text-decoration: none; }
.ats-funnel { display: flex; flex-direction: column; gap: 8px; }
.ats-funnel-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 70px; gap: 12px; align-items: center; font-size: .84rem; }
.ats-funnel-bar { height: 22px; background: var(--ats-bg); border-radius: 6px; overflow: hidden; }
.ats-funnel-bar span { display: block; height: 100%; background: var(--c); border-radius: 6px; min-width: 2px; }

/* ===== MODAL / DRAWER / SUCHE ===== */
.ats-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(3px); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.ats-modal-overlay.open { display: flex; }
.ats-modal { background: #fff; border-radius: var(--ats-radius); width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: var(--ats-shadow-xl); animation: atsModal .22s ease; }
@keyframes atsModal { from { opacity: 0; transform: scale(.96) translateY(-8px); } to { opacity: 1; transform: none; } }
.ats-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--ats-border); background: #fafbfc; position: sticky; top: 0; z-index: 2; }
.ats-modal-title { font-size: 1.05rem; font-weight: 700; }
.ats-modal-close { background: none; border: 0; cursor: pointer; color: var(--ats-text-light); padding: 6px; border-radius: var(--ats-radius-xs); display: inline-flex; }
.ats-modal-close:hover { background: var(--ats-border); color: var(--ats-text); }
.ats-modal-body { padding: 22px; }
.ats-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--ats-border); }
.ats-drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.3); z-index: 900; }
.ats-drawer-overlay.open { display: block; }
.ats-drawer { position: fixed; top: 0; right: 0; width: min(560px, 100%); height: 100vh; background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.12); z-index: 901; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; display: flex; flex-direction: column; }
.ats-drawer.open { transform: none; visibility: visible; transition: transform .25s ease; }
.ats-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ats-border); }
.ats-drawer-title { font-weight: 700; }
.ats-drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.ats-search-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.35); backdrop-filter: blur(2px); z-index: 2000; padding: 10vh 16px 16px; }
.ats-search-overlay.open { display: block; }
.ats-search-box { max-width: 640px; margin: 0 auto; background: #fff; border-radius: var(--ats-radius); box-shadow: var(--ats-shadow-xl); overflow: hidden; }
.ats-search-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ats-border); }
.ats-search-input i { color: var(--ats-primary-dark); }
.ats-search-input input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; }
.ats-search-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.ats-search-hint { padding: 18px; text-align: center; color: var(--ats-muted); font-size: .86rem; }
.ats-search-group { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ats-muted); padding: 10px 12px 4px; }
.ats-search-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--ats-radius-xs); color: var(--ats-text); }
.ats-search-item:hover, .ats-search-item.is-active { background: var(--ats-primary-light); text-decoration: none; }
.ats-search-item small { display: block; color: var(--ats-text-light); font-size: .76rem; }

/* ===== EDITOR ===== */
.ats-editor { border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); background: #fff; overflow: hidden; }
.ats-editor:focus-within { border-color: var(--ats-primary); box-shadow: 0 0 0 4px rgba(246,162,0,.12); }
.ats-editor-bar { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--ats-border); background: #fafbfc; }
.ats-editor-bar button { border: 0; background: none; padding: 5px 7px; border-radius: 5px; cursor: pointer; color: var(--ats-text-2); display: inline-flex; align-items: center; }
.ats-editor-bar button:hover { background: var(--ats-border); }
.ats-editor-bar button i { width: 15px; height: 15px; }
.ats-editor-bar .sep { width: 1px; background: var(--ats-border); margin: 3px 4px; }
.ats-editor-area { min-height: 150px; max-height: 480px; overflow-y: auto; padding: 12px 14px; outline: 0; font-size: .88rem; line-height: 1.6; }
.ats-editor-area:empty::before { content: attr(data-placeholder); color: var(--ats-muted); }
.ats-editor-area p { margin-bottom: .6em; }
.ats-editor-area ul, .ats-editor-area ol, .ats-rich ul, .ats-rich ol { padding-left: 1.4em; margin-bottom: .6em; }
.ats-editor-area h2, .ats-editor-area h3, .ats-rich h2, .ats-rich h3 { font-size: 1rem; margin: .6em 0 .3em; }
.ats-rich p { margin-bottom: .6em; }
.ats-text-block { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
.ats-bausteine { border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); background: #fff; display: flex; flex-direction: column; max-height: 280px; }
.ats-bausteine .ats-input { border: 0; border-bottom: 1px solid var(--ats-border); border-radius: 0; }
.ats-bausteine-list { overflow-y: auto; flex: 1; }
.ats-baustein { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--ats-border-2); background: none; padding: 8px 12px; font: inherit; font-size: .78rem; cursor: pointer; color: var(--ats-text-2); }
.ats-baustein strong { display: block; color: var(--ats-text); font-size: .8rem; }
.ats-baustein:hover { background: var(--ats-primary-light); }

/* ===== STEPPER ===== */
.ats-stepper { display: flex; align-items: center; background: #fff; border: 1px solid var(--ats-border); border-radius: var(--ats-radius); padding: 16px 20px; box-shadow: var(--ats-shadow); margin-bottom: 18px; overflow-x: auto; gap: 8px; }
.ats-step { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--ats-text-light); white-space: nowrap; }
.ats-step-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ats-bg); border: 1px solid var(--ats-border); font-weight: 700; font-size: .8rem; }
.ats-step.active { color: var(--ats-text); font-weight: 600; }
.ats-step.active .ats-step-num { background: var(--ats-primary); border-color: var(--ats-primary); color: #fff; }
.ats-step.done .ats-step-num { background: var(--ats-primary-light); border-color: #fde2a8; color: var(--ats-primary-dark); }
.ats-step-line { flex: 1; height: 2px; background: var(--ats-border); min-width: 24px; }

/* ===== LISTEN / EMPTY ===== */
.ats-empty { text-align: center; padding: 50px 20px; color: var(--ats-text-light); }
.ats-empty i { width: 44px; height: 44px; margin-bottom: 12px; opacity: .4; }
.ats-empty p { font-size: .92rem; margin-bottom: 12px; }
.ats-empty-sm { padding: 26px 16px; }
.ats-empty-sm i { width: 30px; height: 30px; }
.ats-list { display: flex; flex-direction: column; }
.ats-list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ats-border-2); }
.ats-list-item:last-child { border-bottom: 0; }
.ats-list-item .ats-grow { flex: 1; min-width: 0; }
.ats-list-item .ats-title { font-weight: 600; font-size: .86rem; color: var(--ats-text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ats-list-item a.ats-title:hover { color: var(--ats-primary-dark); }

/* ===== CHARTS (eigene SVG-Diagramme) ===== */
.ats-chart { width: 100%; }
.ats-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ats-chart .axis { stroke: var(--ats-border); }
.ats-chart .grid { stroke: var(--ats-border-2); }
.ats-chart text { fill: var(--ats-text-light); font-size: calc(11px * var(--ats-chart-k, 1)); font-family: inherit; }
.ats-chart .bar { transition: opacity .15s; }
.ats-chart .bar:hover { opacity: .8; }
.ats-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .76rem; color: var(--ats-text-light); margin-bottom: 10px; }
.ats-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ats-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; }
.ats-seg-toggle { display: inline-flex; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); overflow: hidden; }
.ats-seg-toggle a, .ats-seg-toggle button { padding: 6px 12px; font-size: .78rem; font-weight: 600; color: var(--ats-text-light); background: #fff; border: 0; font-family: inherit; cursor: pointer; }
.ats-seg-toggle a + a, .ats-seg-toggle button + button { border-left: 1px solid var(--ats-border); }
.ats-seg-toggle .active { background: var(--ats-primary-light); color: var(--ats-primary-dark); }
.ats-seg-toggle a:hover { text-decoration: none; }

/* ===== KALENDER ===== */
.ats-cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ats-cal-title { font-size: 1.1rem; font-weight: 700; flex: 1; text-align: center; min-width: 180px; }
.ats-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--ats-border); border-radius: var(--ats-radius); overflow: hidden; box-shadow: var(--ats-shadow); }
.ats-cal-h { padding: 10px; text-align: center; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ats-text-light); background: linear-gradient(180deg, #f8fafc, #f1f5f9); border-bottom: 1px solid var(--ats-border); }
.ats-cal-d { min-height: 112px; padding: 6px 8px; border-right: 1px solid var(--ats-border-2); border-bottom: 1px solid var(--ats-border-2); font-size: .78rem; position: relative; }
.ats-cal-d:nth-child(7n) { border-right: 0; }
.ats-cal-d.other { background: #fafbfc; color: #cbd5e1; }
.ats-cal-d.today { background: #fffbeb; }
.ats-cal-num { font-weight: 600; margin-bottom: 4px; display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; }
.ats-cal-d.today .ats-cal-num { background: var(--ats-primary); color: #fff; }
.ats-cal-ev { display: block; padding: 2px 6px; border-radius: 4px; margin-bottom: 3px; font-size: .72rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--ats-primary-light); color: var(--ats-primary-dark); border-left: 3px solid var(--ats-primary); }
.ats-cal-ev:hover { text-decoration: none; filter: brightness(.97); }
.ats-cal-ev.vorgeschlagen { background: #f5f3ff; color: #6d28d9; border-left-color: var(--ats-violet); border-style: dashed; }
.ats-cal-ev.abgesagt { text-decoration: line-through; opacity: .6; }
.ats-week { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--ats-border); border-radius: var(--ats-radius); overflow: hidden; }
.ats-week-hour { font-size: .7rem; color: var(--ats-muted); text-align: right; padding: 2px 6px; border-bottom: 1px solid var(--ats-border-2); height: 44px; }
.ats-week-cell { border-left: 1px solid var(--ats-border-2); border-bottom: 1px solid var(--ats-border-2); height: 44px; position: relative; }
.ats-week-cell.slot-free { background: repeating-linear-gradient(45deg, #fff, #fff 6px, #fffbeb 6px, #fffbeb 12px); }
.ats-week-ev { position: absolute; left: 3px; right: 3px; z-index: 2; border-radius: 5px; padding: 2px 5px; font-size: .7rem; overflow: hidden; background: var(--ats-primary-light); border-left: 3px solid var(--ats-primary); color: var(--ats-primary-dark); }

/* ===== SONSTIGES ===== */
.ats-kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 14px; font-size: .86rem; }
.ats-kv dt { color: var(--ats-text-light); }
.ats-note { font-size: .8rem; color: var(--ats-text-light); background: var(--ats-bg); border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); padding: 10px 12px; }
.ats-note i { width: 15px; height: 15px; vertical-align: -3px; color: var(--ats-info); }
.ats-divider { height: 1px; background: var(--ats-border); margin: 18px 0; }
.ats-muted { color: var(--ats-text-light); }
.ats-small { font-size: .8rem; }
.ats-strong { font-weight: 600; }
.ats-right { margin-left: auto; }
.ats-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ats-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ats-mt { margin-top: 16px; } .ats-mb { margin-bottom: 16px; } .ats-mt-sm { margin-top: 8px; }
.ats-nowrap { white-space: nowrap; }
.ats-text-danger { color: var(--ats-danger); } .ats-text-success { color: var(--ats-success); } .ats-text-primary { color: var(--ats-primary-dark); }
.ats-skill-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; border: 1px solid var(--ats-border); background: #fff; font-size: .78rem; }
.ats-skill-chip .lvl { display: inline-flex; gap: 2px; }
.ats-skill-chip .lvl b { width: 7px; height: 7px; border-radius: 50%; background: var(--ats-border); }
.ats-skill-chip .lvl b.on { background: var(--ats-primary); }
.ats-skill-chip.is-must { border-color: #fde2a8; background: var(--ats-primary-light); }
.ats-skill-chip button { border: 0; background: none; cursor: pointer; color: var(--ats-muted); display: inline-flex; }
.ats-skill-chip button i { width: 14px; height: 14px; }
.ats-dropzone { border: 2px dashed #fde2a8; background: var(--ats-primary-light); border-radius: var(--ats-radius); padding: 26px; text-align: center; color: var(--ats-text-2); cursor: pointer; transition: all var(--ats-transition); }
.ats-dropzone:hover, .ats-dropzone.drag { border-color: var(--ats-primary); background: var(--ats-primary-soft); }
.ats-dropzone i { width: 34px; height: 34px; color: var(--ats-primary-dark); margin-bottom: 6px; }
.ats-file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ats-border); border-radius: var(--ats-radius-sm); background: #fff; }
.ats-file-row + .ats-file-row { margin-top: 8px; }
.ats-file-ico { width: 38px; height: 38px; border-radius: var(--ats-radius-sm); background: #fef2f2; color: var(--ats-danger); display: flex; align-items: center; justify-content: center; }
.ats-progress { height: 8px; background: var(--ats-border); border-radius: 99px; overflow: hidden; }
.ats-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ats-primary), var(--ats-primary-dark)); border-radius: 99px; }
.ats-ai { background: linear-gradient(135deg, #fff8eb 0%, #fff 60%); border: 1px solid #fde2a8; }
.ats-ai .ats-card-title i { color: var(--ats-primary-dark); }
.ats-preview-frame { width: 100%; border: 1px solid var(--ats-border); border-radius: var(--ats-radius); background: #e5e7eb; min-height: 600px; }
.ats-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: var(--ats-bg); border: 1px solid var(--ats-border); border-radius: var(--ats-radius-xs); padding: 8px 10px; word-break: break-all; }

/* ===== AUTH (hell, kein Dunkel) ===== */
.ats-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, #fff4d6 0%, rgba(255,244,214,0) 60%), radial-gradient(900px 500px at 110% 110%, #fff8eb 0%, rgba(255,248,235,0) 60%), var(--ats-bg); }
.ats-auth-box { background: #fff; border: 1px solid var(--ats-border); border-radius: 18px; padding: 42px 40px; width: 100%; max-width: 430px; box-shadow: var(--ats-shadow-lg); }
.ats-auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 28px; }
.ats-auth-logo img { height: 35px; width: auto; }
.ats-auth-title { font-size: 1.35rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.ats-auth-sub { font-size: .88rem; color: var(--ats-text-light); text-align: center; margin-bottom: 26px; }
.ats-auth .ats-field { margin-bottom: 14px; }
.ats-auth .ats-input { padding: 12px 14px; font-size: .95rem; }
.ats-auth .ats-btn { width: 100%; padding: 12px; font-size: .95rem; }
.ats-auth-links { text-align: center; margin-top: 18px; font-size: .84rem; }
.ats-auth-foot { text-align: center; margin-top: 20px; font-size: .74rem; color: var(--ats-muted); }
.ats-otp { letter-spacing: .5em; text-align: center; font-size: 1.3rem !important; font-weight: 700; }

/* ===== MOBILE ===== */
.ats-mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: 58px; background: #fff; border-bottom: 1px solid var(--ats-border); z-index: 200; padding: 0 14px; align-items: center; justify-content: space-between; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ats-mh-logo { display: flex; align-items: center; gap: 8px; }
.ats-mh-logo img { height: 35px; width: auto; }
.ats-mh-logo span { font-size: .66rem; font-weight: 800; color: #fff; background: var(--ats-primary); padding: 2px 7px; border-radius: 99px; }
.ats-mobile-toggle { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; border-radius: var(--ats-radius-sm); color: var(--ats-text); }
.ats-mobile-toggle i { width: 24px; height: 24px; }
.ats-mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 150; }
.ats-mobile-overlay.open { display: block; }

@media (max-width: 1200px) {
    .ats-detail-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ats-detail-head .ats-person-card { grid-column: span 3; }
    .ats-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ats-text-block { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
    .ats-mobile-header { display: flex; }
    .ats-sidebar { transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1); z-index: 250; box-shadow: none; }
    .ats-sidebar.open { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,.15); }
    .ats-main { margin-left: 0; padding: 66px 20px 20px; }
    .ats-topbar { top: 58px; }
    .ats-grid-main, .ats-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .ats-tl-item { grid-template-columns: 34px minmax(0,1fr); }
    .ats-tl-item::before { left: 16px; }
    .ats-tl-when { grid-column: 2; text-align: left; order: -1; padding: 0 0 4px; display: flex; gap: 8px; }
    .ats-tl-dot { grid-row: span 2; }
}
@media (max-width: 768px) {
    .ats-main { padding: 64px 12px 16px; }
    .ats-page-title { font-size: 1.2rem; }
    .ats-grid-2, .ats-grid-4 { grid-template-columns: minmax(0, 1fr); }
    .ats-form-grid > [class*="ats-col-"] { grid-column: span 12; }
    .ats-detail-head { grid-template-columns: minmax(0, 1fr); }
    .ats-detail-head .ats-person-card { grid-column: auto; }
    .ats-search-trigger span, .ats-search-trigger kbd { display: none; }
    .ats-search-trigger { width: 38px; padding: 9px; border-radius: 50%; justify-content: center; }
    .ats-modal-overlay { padding: 0; align-items: flex-end; }
    .ats-modal { max-height: 92vh; border-radius: var(--ats-radius) var(--ats-radius) 0 0; }
    .ats-expert-rule { grid-template-columns: minmax(0, 1fr); }
    .ats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ats-kpi { padding: 14px; gap: 10px; }
    .ats-kpi-icon { width: 38px; height: 38px; }
    .ats-kpi-value { font-size: 1.3rem; }
    .ats-kv { grid-template-columns: minmax(0, 1fr); }
    .ats-notif-dd { width: min(360px, 92vw); }
}
@media print {
    .ats-sidebar, .ats-topbar, .ats-mobile-header, .ats-footer, .ats-btn, .ats-detail-head .ats-action-box, .ats-tabs { display: none !important; }
    .ats-main { margin: 0; padding: 0; }
    body { background: #fff; }
    .ats-card, .ats-tl-body { box-shadow: none; }
}
