:root{--rose-950:#47232f;--rose-800:#70404f;--rose-700:#8f5267;--rose-600:#a95f79;--rose-500:#c2768e;--rose-300:#e6b9c7;--rose-200:#f0d4dc;--rose-100:#f8e9ed;--rose-50:#fdf7f8;--paper:#fffdfd;--ink:#402b32;--muted:#806c72;--line:#eedde2;--danger:#a33b4c;--shadow:0 24px 70px rgba(103,56,72,.12);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--rose-50);font-size:16px}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 88% 12%,rgba(241,204,215,.42),transparent 30%),var(--rose-50)}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button{border:0;border-radius:12px;min-height:48px;padding:0 22px;background:var(--rose-700);color:white;font-weight:700;transition:background .2s,box-shadow .2s,transform .2s}button:hover{background:var(--rose-800);box-shadow:0 8px 24px rgba(112,64,79,.18)}button:active{transform:translateY(1px)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(194,118,142,.3);outline-offset:2px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.app-shell{min-height:100vh;display:grid;grid-template-columns:328px 1fr}.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;background:rgba(255,253,253,.92);border-right:1px solid var(--line);backdrop-filter:blur(18px)}.brand{display:flex;align-items:center;gap:14px;padding:29px 26px 27px;border-bottom:1px solid var(--line)}.brand-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(145deg,var(--rose-200),var(--rose-100));color:var(--rose-700);box-shadow:inset 0 0 0 1px rgba(169,95,121,.09)}.brand-mark svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.brand strong,.brand span{display:block}.brand strong{font-family:Georgia,serif;font-size:1.35rem;font-weight:400;letter-spacing:.01em}.brand span{color:var(--muted);font-size:.75rem;margin-top:2px}.sidebar-content{padding:30px 24px;flex:1}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;color:var(--rose-950);font-size:.76rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em}.count{display:grid;place-items:center;min-width:25px;height:25px;padding:0 7px;border-radius:99px;background:var(--rose-100);color:var(--rose-700);font-size:.72rem}.select-wrap{position:relative;margin-bottom:12px}.select-wrap>svg:first-child{position:absolute;z-index:1;left:14px;top:14px;width:20px;height:20px;fill:none;stroke:var(--rose-600);stroke-width:1.8}.select-wrap .chevron{position:absolute;right:13px;top:15px;width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;pointer-events:none}.select-wrap select{appearance:none;width:100%;height:50px;padding:0 40px 0 43px;border:1px solid var(--line);border-radius:13px;background:white;color:var(--ink);font-weight:500}.new-patient{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:11px;background:var(--rose-100);color:var(--rose-800);padding:0 14px}.new-patient:hover{background:var(--rose-200);box-shadow:none}.new-patient span{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:white}.new-patient svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}.sidebar-footer{display:flex;gap:12px;padding:22px 24px;border-top:1px solid var(--line);background:var(--rose-50)}.privacy-icon{flex:0 0 auto;width:35px;height:35px;display:grid;place-items:center;border-radius:10px;background:white;color:var(--rose-600);border:1px solid var(--line)}.privacy-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}.sidebar-footer strong,.sidebar-footer span{display:block}.sidebar-footer strong{font-size:.77rem}.sidebar-footer span{max-width:195px;color:var(--muted);font-size:.68rem;line-height:1.45;margin-top:3px}.workspace{min-width:0;padding:0 clamp(28px,5vw,78px) 54px}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(238,221,226,.75)}.topbar p{margin:0;color:var(--muted);font-size:.86rem}.date-pill{padding:8px 13px;border:1px solid var(--line);border-radius:99px;background:rgba(255,255,255,.7);color:var(--rose-800);font-size:.75rem;text-transform:capitalize}.empty-state{position:relative;min-height:calc(100vh - 142px);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;overflow:hidden}.empty-state>*:not(.orb){position:relative;z-index:1}.orb{position:absolute;border-radius:50%;filter:blur(1px)}.orb-one{width:430px;height:430px;background:rgba(244,218,226,.42);top:13%;left:50%;transform:translateX(-50%)}.orb-two{width:180px;height:180px;background:rgba(255,255,255,.7);top:27%;left:50%;transform:translateX(-50%)}.empty-illustration{width:82px;height:82px;display:grid;place-items:center;border-radius:26px;background:linear-gradient(145deg,#fff,var(--rose-100));color:var(--rose-600);box-shadow:0 16px 38px rgba(143,82,103,.13);margin-bottom:27px}.empty-illustration svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.kicker{margin:0 0 9px;color:var(--rose-600);font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.15em}.empty-state h1,.editor-header h1,dialog h2{font-family:Georgia,serif;font-weight:400;color:var(--rose-950)}.empty-state h1{font-size:clamp(2.3rem,4.4vw,4.1rem);line-height:1.05;letter-spacing:-.025em;margin:0 0 20px}.empty-state>p:not(.kicker){max-width:530px;color:var(--muted);line-height:1.7;margin:0 0 28px}.empty-state button{min-width:220px}.editor{width:100%;max-width:1120px;margin:0 auto;padding-top:42px}.editor-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:23px}.editor-header h1{font-size:clamp(2.1rem,3.5vw,3.2rem);line-height:1;margin:0}.save-status{display:flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid var(--line);border-radius:99px;background:rgba(255,255,255,.75);color:var(--muted);font-size:.75rem;white-space:nowrap}.save-status span{width:7px;height:7px;border-radius:50%;background:#60a883;box-shadow:0 0 0 3px rgba(96,168,131,.13)}.save-status.saving span{background:#d09c55;box-shadow:0 0 0 3px rgba(208,156,85,.13)}.save-status.error-state{color:var(--danger)}.save-status.error-state span{background:var(--danger)}.note-card{min-height:calc(100vh - 210px);display:flex;flex-direction:column;padding:29px 33px 20px;background:rgba(255,253,253,.96);border:1px solid var(--line);border-radius:22px;box-shadow:0 18px 55px rgba(90,50,63,.08)}.paper-top{display:flex;justify-content:space-between;align-items:center;padding-bottom:17px;border-bottom:1px solid var(--line)}.paper-top label{font-weight:700;font-size:.86rem;color:var(--rose-950)}.paper-top span{color:var(--muted);font-size:.7rem}.note-card textarea{width:100%;flex:1;min-height:430px;resize:none;border:0;background:repeating-linear-gradient(transparent,transparent 31px,rgba(240,212,220,.38) 32px);color:#49343b;line-height:32px;font-size:1rem;padding:22px 3px}.note-card textarea::placeholder{color:#b29da4}.note-card textarea:focus-visible{outline:0}.note-card footer{display:flex;justify-content:space-between;gap:16px;padding-top:15px;border-top:1px solid var(--line);color:var(--muted);font-size:.7rem}kbd{font-family:inherit;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:2px 5px;margin-right:3px;background:var(--rose-50)}dialog{width:min(92vw,470px);border:0;border-radius:24px;padding:0;color:var(--ink);box-shadow:var(--shadow)}dialog::backdrop{background:rgba(67,35,47,.48);backdrop-filter:blur(5px)}dialog form{position:relative;padding:36px}.dialog-close{position:absolute;right:18px;top:18px;width:42px;min-height:42px;padding:0;display:grid;place-items:center;background:var(--rose-100);color:var(--rose-700)}.dialog-close:hover{background:var(--rose-200);box-shadow:none}.dialog-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}.dialog-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--rose-100);color:var(--rose-700);margin-bottom:22px}.dialog-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2}.dialog-icon+.kicker{margin-bottom:6px}dialog h2{font-size:2rem;margin:0 0 9px}dialog p:not(.kicker):not(.error){color:var(--muted);line-height:1.55;font-size:.88rem;margin:0 0 25px}dialog label{display:block;font-size:.78rem;font-weight:700;margin-bottom:8px}dialog input{width:100%;height:50px;padding:0 14px;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:white}.error{min-height:20px;color:var(--danger);font-size:.78rem;margin:7px 0 0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.ghost{background:var(--rose-100);color:var(--rose-800)}.ghost:hover{background:var(--rose-200);box-shadow:none}[hidden]{display:none!important}
@media(max-width:780px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto}.brand{padding:18px}.sidebar-content{padding:18px}.sidebar-footer{display:none}.workspace{padding:0 18px 28px}.topbar{height:68px}.topbar p{display:none}.empty-state{min-height:calc(100vh - 260px);padding:40px 0}.empty-state h1{font-size:2.55rem}.editor{padding-top:28px}.editor-header{align-items:flex-start}.note-card{min-height:60vh;padding:22px 20px}.paper-top span,.note-card footer span:last-child{display:none}.date-pill{margin-left:auto}dialog form{padding:30px 24px}.dialog-actions{flex-direction:column-reverse}.dialog-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Login & Seelsorge-Assistent */
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 22% 18%,rgba(240,202,214,.58),transparent 28%),radial-gradient(circle at 82% 82%,rgba(246,221,228,.7),transparent 30%),var(--rose-50)}.login-card{width:min(100%,460px);padding:46px;border:1px solid var(--line);border-radius:28px;background:rgba(255,253,253,.95);box-shadow:var(--shadow)}.login-mark{width:60px;height:60px;display:grid;place-items:center;margin-bottom:28px;border-radius:19px;background:linear-gradient(145deg,var(--rose-200),var(--rose-100));color:var(--rose-700)}.login-mark svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.login-card h1{font-family:Georgia,serif;font-size:2.35rem;font-weight:400;color:var(--rose-950);margin:0 0 12px}.login-card>p:not(.kicker){color:var(--muted);line-height:1.6;margin:0 0 28px}.login-card label{display:block;margin-bottom:8px;font-size:.78rem;font-weight:700}.pin-row{display:grid;grid-template-columns:1fr auto;gap:10px}.pin-row input{width:100%;height:50px;padding:0 15px;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:white}.login-card .error{margin-bottom:0}
.app-shell{grid-template-columns:300px minmax(480px,1fr) 370px}.workspace{padding-left:clamp(24px,3vw,54px);padding-right:clamp(24px,3vw,54px)}.chat-panel{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;background:rgba(255,253,253,.94);border-left:1px solid var(--line);backdrop-filter:blur(18px)}.chat-header{display:flex;align-items:center;gap:12px;padding:22px 20px;border-bottom:1px solid var(--line)}.assistant-avatar{position:relative;flex:0 0 auto;width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:var(--rose-100);color:var(--rose-700)}.assistant-avatar svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.assistant-avatar span{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border:2px solid white;border-radius:50%;background:#64ad87}.chat-header h2{font-family:Georgia,serif;font-size:1.02rem;font-weight:400;color:var(--rose-950);margin:0 0 3px}.chat-header p{color:var(--muted);font-size:.68rem;margin:0}.chat-messages{flex:1;overflow-y:auto;padding:22px 18px 10px;scrollbar-width:thin;scrollbar-color:var(--rose-200) transparent}.message{width:fit-content;max-width:92%;margin-bottom:13px;padding:13px 15px;border-radius:16px;font-size:.82rem;line-height:1.55}.message p{margin:0}.message p+p{margin-top:8px}.assistant-message{border:1px solid var(--line);border-top-left-radius:5px;background:white;color:#503840;box-shadow:0 5px 18px rgba(103,56,72,.05)}.user-message{margin-left:auto;border-bottom-right-radius:5px;background:var(--rose-700);color:white}.chat-error{color:var(--danger);background:#fff5f6}.chat-thinking{display:flex;align-items:center;gap:4px;margin:0 18px 8px;color:var(--muted);font-size:.68rem}.chat-thinking span{width:5px;height:5px;border-radius:50%;background:var(--rose-500);animation:pulse 1.1s infinite}.chat-thinking span:nth-child(2){animation-delay:.15s}.chat-thinking span:nth-child(3){animation-delay:.3s;margin-right:4px}@keyframes pulse{0%,70%,100%{opacity:.28;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}.chat-form{margin:10px 16px 18px;padding:12px;border:1px solid var(--line);border-radius:17px;background:white;box-shadow:0 10px 30px rgba(103,56,72,.08)}.chat-form textarea{width:100%;min-height:68px;max-height:150px;resize:vertical;padding:2px 3px;border:0;background:transparent;color:var(--ink);font-size:.82rem;line-height:1.5}.chat-form textarea:focus-visible{outline:0}.chat-form textarea::placeholder{color:#af989f}.chat-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.chat-actions>span{color:var(--muted);font-size:.61rem}.chat-actions button{width:38px;min-height:38px;padding:0;display:grid;place-items:center;border-radius:11px}.chat-actions button:disabled{opacity:.45;cursor:not-allowed}.chat-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:1180px){.app-shell{grid-template-columns:260px minmax(430px,1fr) 330px}.brand{padding-left:20px;padding-right:20px}.sidebar-content{padding-left:18px;padding-right:18px}.workspace{padding-left:26px;padding-right:26px}}
@media(max-width:980px){.app-shell{grid-template-columns:250px 1fr}.chat-panel{position:fixed;z-index:5;right:0;bottom:0;top:auto;width:min(94vw,380px);height:68vh;border:1px solid var(--line);border-radius:22px 0 0 0;box-shadow:var(--shadow)}.note-card{padding-bottom:120px}}
@media(max-width:780px){.app-shell{grid-template-columns:1fr}.chat-panel{height:58vh}.login-card{padding:34px 25px}.pin-row{grid-template-columns:1fr}.pin-row button{width:100%}}
