/* RainShift CRM – ruhige, aufgabenorientierte UX-Vorschau */
:root {
    --ux-ink: #172033;
    --ux-muted: #667085;
    --ux-line: #e5e9f0;
    --ux-surface: #ffffff;
    --ux-canvas: #f5f7fb;
    --ux-brand: #4f46e5;
    --ux-brand-dark: #3730a3;
    --ux-mint: #0f9f83;
    --ux-amber: #d97706;
    --ux-rose: #d94b70;
    --ux-shadow: 0 8px 24px rgba(23, 32, 51, .045);
}

.ux-page {
    color: var(--ux-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reduzierte Präsentationsansicht: größere Flächen, weniger visuelles Rauschen. */
.ux-page.ux-reduced { font-size: 16px; }
.ux-page.ux-reduced .ux-hero { border-radius: 20px; background: #202b4d; }
.ux-page.ux-reduced .ux-hero::after { display: none; }
.ux-page.ux-reduced .ux-hero-content { padding: 2.5rem; }
.ux-page.ux-reduced .ux-eyebrow { font-size: .7rem; letter-spacing: .14em; }
.ux-page.ux-reduced .ux-hero h1 { max-width: 720px; font-size: clamp(2.2rem, 4vw, 3.45rem); line-height: 1.08; letter-spacing: -.045em; }
.ux-page.ux-reduced .ux-hero-copy { max-width: 620px; color: #c7d0e2; font-size: 1rem; line-height: 1.7; }
.ux-page.ux-reduced .ux-primary-button { min-height: 46px; padding-inline: 1rem; border-radius: 9px; }
.ux-page.ux-reduced .ux-command-hint { display: none; }
.ux-page.ux-reduced .ux-today-panel { border: 0; border-left: 1px solid rgba(255,255,255,.22); border-radius: 0; background: transparent; padding: 0 0 0 2rem; }
.ux-page.ux-reduced .ux-today-panel .ux-today-number { margin-top: .5rem; font-size: 2.65rem; line-height: 1; }
.ux-page.ux-reduced .ux-kpi { min-height: 118px; padding: 1.25rem 1.35rem; }
.ux-page.ux-reduced .ux-kpi-icon { display: none; }
.ux-page.ux-reduced .ux-kpi-value { margin-top: 0; font-size: 2rem; }
.ux-page.ux-reduced .ux-kpi-meta { margin-top: .4rem; font-size: .85rem; }
.ux-page.ux-reduced .ux-section-title { margin-bottom: 1rem; }
.ux-page.ux-reduced .ux-section-title h2 { font-size: 1.25rem; }
.ux-page.ux-reduced .ux-focus-item { min-height: 68px; padding: .9rem 1rem; border-radius: 11px; }
.ux-page.ux-reduced .ux-focus-icon { width: 38px; height: 38px; border-radius: 9px; }
.ux-page.ux-reduced .ux-focus-copy .ux-focus-label { font-size: .75rem; }
.ux-page.ux-reduced .ux-focus-copy .ux-focus-title { font-size: .92rem; }
.ux-page.ux-reduced .ux-area-card { min-height: 310px; padding: 1.45rem; border-radius: 14px; box-shadow: none; }
.ux-page.ux-reduced .ux-area-card:hover { transform: none; box-shadow: 0 8px 24px rgba(23, 32, 51, .06); }
.ux-page.ux-reduced .ux-area-title h3 { font-size: 1.05rem; }
.ux-page.ux-reduced .ux-area-title p { font-size: .8rem; }
.ux-page.ux-reduced .ux-area-preview { margin-top: 1.25rem; padding-top: 1rem; }
.ux-page.ux-reduced .ux-mini-row { min-height: 54px; padding: .65rem 0; }
.ux-page.ux-reduced .ux-mini-main strong { font-size: .86rem; }
.ux-page.ux-reduced .ux-mini-main span { font-size: .75rem; }
.ux-page.ux-reduced .ux-mini-status { font-size: .7rem; }
.ux-page.ux-reduced .ux-filter-bar { max-width: 660px; }
.ux-page.ux-reduced .ux-filter-bar input { min-height: 44px; padding-inline: .85rem; font-size: .9rem; }
.ux-page.ux-reduced .ux-filter-bar select { min-height: 44px; font-size: .9rem; }
.ux-page.ux-reduced .ux-filter-chip { border: 0; background: transparent; padding: 0; color: var(--ux-muted); font-size: .8rem; }
.ux-page.ux-reduced { width: 100%; }
.page-content.ux-page-container { padding-left: 0 !important; padding-right: 0 !important; }

.ux-page a { text-decoration: none; }

.ux-page .ux-eyebrow {
    color: var(--ux-brand);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ux-page .ux-muted { color: var(--ux-muted); }

.ux-page .ux-card {
    border: 1px solid var(--ux-line);
    border-radius: 18px;
    background: var(--ux-surface);
    box-shadow: var(--ux-shadow);
}

.ux-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: radial-gradient(circle at 88% 20%, rgba(129, 140, 248, .25), transparent 30%), linear-gradient(135deg, #1e2853 0%, #312e81 52%, #4f46e5 100%);
    color: #fff;
}

.ux-hero::after {
    position: absolute;
    right: -7rem;
    bottom: -9rem;
    width: 22rem;
    height: 22rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .035), 0 0 0 80px rgba(255, 255, 255, .025);
    content: "";
}

.ux-hero .ux-muted { color: rgba(255, 255, 255, .72); }

.ux-hero-content { position: relative; z-index: 1; }

.ux-primary-button,
.ux-secondary-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: 11px;
    padding: .65rem .9rem;
    font-size: .86rem;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ux-primary-button { background: #fff; color: #312e81; box-shadow: 0 5px 14px rgba(15, 23, 42, .16); }
.ux-primary-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(15, 23, 42, .22); }
.ux-secondary-button { border: 1px solid var(--ux-line); background: #fff; color: var(--ux-ink); }
.ux-secondary-button:hover { background: #f8faff; }

.ux-kpi {
    position: relative;
    min-height: 126px;
    padding: 1.1rem;
}

.ux-kpi::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 18px 18px 0 0;
    background: var(--ux-accent, var(--ux-brand));
    content: "";
}

.ux-kpi-value { margin-top: .25rem; font-size: 1.8rem; font-weight: 800; letter-spacing: -.04em; }
.ux-kpi-meta { margin-top: .5rem; color: var(--ux-muted); font-size: .76rem; }
.ux-kpi-icon { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 9px; background: color-mix(in srgb, var(--ux-accent, var(--ux-brand)) 12%, white); color: var(--ux-accent, var(--ux-brand)); }

.ux-section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.ux-section-title h2 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.ux-section-title a { color: var(--ux-brand); font-size: .8rem; font-weight: 700; }

.ux-focus-list { display: grid; gap: .6rem; }
.ux-focus-item { display: flex; align-items: center; gap: .75rem; padding: .72rem .8rem; border: 1px solid var(--ux-line); border-radius: 13px; background: #fff; }
.ux-focus-item:hover { border-color: #c7d2fe; background: #fafaff; }
.ux-focus-icon { display: inline-flex; flex: 0 0 auto; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 10px; background: #eef2ff; color: var(--ux-brand); font-size: .9rem; }
.ux-focus-copy { min-width: 0; flex: 1; }
.ux-focus-copy p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.ux-focus-copy .ux-focus-label { color: var(--ux-muted); font-size: .7rem; }
.ux-focus-copy .ux-focus-title { margin-top: .1rem; font-size: .83rem; font-weight: 700; }
.ux-priority { border-radius: 999px; padding: .22rem .48rem; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.ux-priority.high { background: #fff1f2; color: #be123c; }
.ux-priority.medium { background: #fffbeb; color: #b45309; }
.ux-priority.low { background: #ecfdf5; color: #047857; }

.ux-area-card { display: flex; min-height: 278px; flex-direction: column; padding: 1.1rem; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ux-area-card.hidden { display: none; }
.ux-area-card:hover { transform: translateY(-2px); border-color: #c7d2fe; box-shadow: 0 18px 36px rgba(23, 32, 51, .1); }
.ux-area-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.ux-area-title { display: flex; align-items: center; gap: .6rem; }
.ux-area-title h3 { margin: 0; font-size: .96rem; font-weight: 800; }
.ux-area-title p { margin: .16rem 0 0; color: var(--ux-muted); font-size: .72rem; }
.ux-area-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 11px; background: var(--ux-area-tint, #eef2ff); color: var(--ux-area-color, var(--ux-brand)); font-size: 1rem; }
.ux-area-link { color: var(--ux-brand); font-size: .78rem; font-weight: 800; }
.ux-area-preview { flex: 1; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--ux-line); }

.ux-mini-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #f0f2f6; font-size: .73rem; }
.ux-mini-row:last-child { border-bottom: 0; }
.ux-mini-main { min-width: 0; }
.ux-mini-main strong, .ux-mini-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ux-mini-main strong { color: var(--ux-ink); font-size: .74rem; }
.ux-mini-main span { margin-top: .13rem; color: var(--ux-muted); font-size: .68rem; }
.ux-mini-status { flex: 0 0 auto; border-radius: 999px; padding: .2rem .42rem; background: #f1f5f9; color: #475569; font-size: .64rem; font-weight: 800; }
.ux-mini-status.open { background: #eef2ff; color: #4338ca; }
.ux-mini-status.good { background: #ecfdf5; color: #047857; }
.ux-mini-status.warn { background: #fff7ed; color: #c2410c; }

.ux-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #edf0f5; }
.ux-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--ux-bar, var(--ux-brand)); }
.ux-progress-label { display: flex; justify-content: space-between; margin-bottom: .35rem; color: var(--ux-muted); font-size: .7rem; }

.ux-agenda { display: grid; gap: .5rem; }
.ux-event { display: grid; grid-template-columns: 42px 1fr; gap: .65rem; align-items: start; }
.ux-event-time { padding-top: .05rem; color: var(--ux-muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.ux-event-card { border-left: 3px solid var(--ux-event-color, var(--ux-brand)); border-radius: 0 9px 9px 0; padding: .5rem .6rem; background: #f8fafc; }
.ux-event-card strong { display: block; font-size: .73rem; }
.ux-event-card span { display: block; margin-top: .15rem; color: var(--ux-muted); font-size: .67rem; }

.ux-chart { display: flex; height: 76px; align-items: end; gap: .45rem; padding-top: .5rem; }
.ux-chart-bar { flex: 1; min-height: 10px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #818cf8, #4f46e5); }
.ux-chart-labels { display: flex; justify-content: space-between; color: var(--ux-muted); font-size: .64rem; }

.ux-filter-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ux-filter-bar input, .ux-filter-bar select { min-height: 40px; border: 1px solid var(--ux-line); border-radius: 10px; background: #fff; padding: .55rem .7rem; color: var(--ux-ink); font-size: .8rem; }
.ux-filter-bar input { min-width: 220px; flex: 1; }
.ux-filter-chip { display: inline-flex; align-items: center; min-height: 32px; border: 1px solid #c7d2fe; border-radius: 999px; background: #eef2ff; padding: .35rem .62rem; color: #4338ca; font-size: .7rem; font-weight: 700; }

.ux-command-hint { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; padding: .25rem .45rem; color: rgba(255,255,255,.72); font-size: .68rem; }
.ux-command-hint kbd { border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: .08rem .25rem; color: #fff; font-size: .66rem; }

@media (max-width: 768px) {
    .page-content.ux-page-container { padding-left: .75rem !important; padding-right: .75rem !important; }
    .ux-page.ux-reduced .ux-hero-content { padding: 1.4rem; }
    .ux-page.ux-reduced .ux-hero h1 { font-size: 2.2rem; }
    .ux-page.ux-reduced .ux-today-panel { margin-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); border-left: 0; padding: 1.1rem 0 0; }
    .ux-page.ux-reduced .ux-area-card { min-height: 280px; padding: 1.1rem; }
    .ux-hero { border-radius: 18px; }
    .ux-hero-content { padding: 1.15rem !important; }
    .ux-kpi { min-height: 106px; padding: .8rem; }
    .ux-kpi-value { font-size: 1.45rem; }
    .ux-area-card { min-height: 252px; }
    .ux-section-title { align-items: flex-start; flex-direction: column; gap: .3rem; }
    .ux-filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .ux-filter-bar input { min-width: 0; grid-column: 1 / -1; }
    .ux-filter-bar .ux-secondary-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .ux-primary-button, .ux-area-card { transition: none; }
}
