/* ============================================================
   CoreScale Kundenportal — gemeinsame Styles
   ============================================================ */

*{margin:0;padding:0;box-sizing:border-box}
body{background:#0a0a0a;color:#f5f5f5;font-family:'Inter',sans-serif;min-height:100vh;overflow-x:hidden}
a{color:inherit}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-30px)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}

/* ============ LOGIN — Split Screen ============ */
.shell{display:grid;grid-template-columns:1fr 1.1fr;min-height:100vh}

.form-side{
    position:relative;display:flex;flex-direction:column;
    padding:2.5rem 3rem;min-height:100vh;background:#0a0a0a;
    background-image:radial-gradient(rgba(255,255,255,.025) 1px,transparent 1px);background-size:24px 24px;
}
.form-side::before{
    content:'';position:absolute;width:500px;height:500px;border-radius:50%;
    top:-150px;left:-150px;filter:blur(80px);pointer-events:none;
    background:radial-gradient(circle,rgba(255,106,0,.05),transparent 70%);
    animation:float 14s ease-in-out infinite;
}
.form-header{display:flex;align-items:center;gap:.75rem;text-decoration:none}
.form-header .logo{font-size:1.35rem;font-weight:800;letter-spacing:-.02em}
.form-header .logo .a{color:#f5f5f5}
.form-header .logo .b{color:#ff6a00}
.form-header .tag{font-size:.62rem;font-weight:600;color:#666;letter-spacing:.2em;
    text-transform:uppercase;padding:.3rem .55rem;border:1px solid #1f1f1f;border-radius:4px}

.form-wrap{flex:1;display:flex;flex-direction:column;justify-content:center;
    max-width:420px;width:100%;margin:0 auto;position:relative;z-index:1}
.form-title{font-size:2rem;font-weight:700;letter-spacing:-.02em;margin-bottom:.55rem}
.form-sub{color:#777;font-size:.95rem;margin-bottom:2.5rem;line-height:1.5}

.field{margin-bottom:1.15rem}
.field-label{display:block;font-size:.78rem;font-weight:500;color:#aaa;margin-bottom:.5rem}
.field-wrap{position:relative}
.field-icon{position:absolute;left:1rem;top:50%;transform:translateY(-50%);color:#555;pointer-events:none;display:flex}
.field-icon svg{width:16px;height:16px}
.field-input{
    width:100%;background:#111;border:1px solid #1f1f1f;border-radius:9px;
    padding:.95rem 1rem .95rem 2.75rem;color:#f5f5f5;font-family:inherit;
    font-size:.92rem;outline:none;transition:all .25s;
}
.field-input:focus{border-color:#ff6a00;background:#161616;box-shadow:0 0 0 3px rgba(255,106,0,.12)}
.field-wrap:focus-within .field-icon{color:#ff6a00}
.field-input::placeholder{color:#444}
.pw-toggle{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);
    background:transparent;border:none;color:#555;cursor:pointer;padding:.5rem;
    border-radius:6px;display:flex;transition:color .2s}
.pw-toggle:hover{color:#aaa}
.pw-toggle svg{width:16px;height:16px}

.row{display:flex;justify-content:space-between;align-items:center;margin:1.4rem 0 1.7rem}
.check{display:flex;align-items:center;gap:.55rem;cursor:pointer;user-select:none}
.check input{position:absolute;opacity:0;pointer-events:none}
.check-box{width:16px;height:16px;border:1.5px solid #333;border-radius:4px;
    background:#0f0f0f;display:flex;align-items:center;justify-content:center;transition:all .2s}
.check input:checked+.check-box{background:#ff6a00;border-color:#ff6a00}
.check input:checked+.check-box::after{content:'';width:8px;height:5px;
    border-left:2px solid #0a0a0a;border-bottom:2px solid #0a0a0a;
    transform:rotate(-45deg);margin-top:-2px}
.check-label{font-size:.82rem;color:#aaa}
.link-forgot{font-size:.82rem;color:#ff6a00;text-decoration:none;font-weight:500}
.link-forgot:hover{text-decoration:underline}

.submit-btn{
    width:100%;background:#ff6a00;color:#0a0a0a;border:none;border-radius:9px;
    padding:1rem;font-family:inherit;font-size:.95rem;font-weight:700;cursor:pointer;
    transition:all .25s;display:flex;align-items:center;justify-content:center;gap:.5rem;
}
.submit-btn:hover:not(:disabled){background:#ff8c33;transform:translateY(-1px);box-shadow:0 10px 30px rgba(255,106,0,.3)}
.submit-btn:disabled{opacity:.7;cursor:wait}
.submit-btn .spinner{width:14px;height:14px;border:2px solid rgba(10,10,10,.3);
    border-top-color:#0a0a0a;border-radius:50%;animation:spin .8s linear infinite;display:none}
.submit-btn.loading .spinner{display:block}
.submit-btn.loading .label{display:none}

.error,.info{
    border-radius:8px;font-size:.83rem;margin-bottom:1.25rem;
    display:flex;align-items:center;gap:.55rem;padding:.75rem 1rem;
}
.error{background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.2);color:#fca5a5}
.info{background:rgba(56,189,248,.06);border:1px solid rgba(56,189,248,.18);color:#7dd3fc}
.error svg,.info svg{width:14px;height:14px;flex-shrink:0}
.shake{animation:shake .4s}

.hint{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #161616;text-align:center;font-size:.83rem;color:#666}
.hint a{color:#ff6a00;text-decoration:none;font-weight:500}
.hint a:hover{text-decoration:underline}

.form-footer{display:flex;justify-content:space-between;align-items:center;font-size:.72rem;color:#444;margin-top:2rem}
.form-footer a{color:#555;text-decoration:none;margin-left:1rem;transition:color .2s}
.form-footer a:hover{color:#aaa}

.brand-side{
    position:relative;overflow:hidden;
    background:radial-gradient(ellipse at 30% 20%,#1a1208 0%,#0a0a0a 65%);
    display:flex;flex-direction:column;justify-content:center;padding:3rem 4rem;
}
.brand-side::before,.brand-side::after{
    content:'';position:absolute;border-radius:50%;filter:blur(100px);pointer-events:none;
    animation:float 16s ease-in-out infinite;
}
.brand-side::before{width:700px;height:700px;
    background:radial-gradient(circle,rgba(255,106,0,.12),transparent 70%);top:-200px;right:-200px}
.brand-side::after{width:500px;height:500px;
    background:radial-gradient(circle,rgba(255,140,51,.06),transparent 70%);
    bottom:-150px;left:-100px;animation-delay:-8s}
.brand-content{position:relative;z-index:1;max-width:520px}
.brand-eyebrow{display:inline-flex;align-items:center;gap:.5rem;
    background:rgba(255,106,0,.08);border:1px solid rgba(255,106,0,.2);
    padding:.4rem .85rem;border-radius:100px;font-size:.72rem;font-weight:600;
    color:#ff8c33;letter-spacing:.08em;text-transform:uppercase;margin-bottom:2rem}
.brand-eyebrow .dot{width:6px;height:6px;background:#ff6a00;border-radius:50%;
    box-shadow:0 0 0 3px rgba(255,106,0,.2)}
.brand-headline{font-size:2.75rem;font-weight:800;line-height:1.1;letter-spacing:-.025em;margin-bottom:1.25rem}
.brand-headline .accent{color:#ff6a00}
.brand-lead{color:#999;font-size:1.05rem;line-height:1.55;margin-bottom:3rem}
.feature{display:flex;gap:1rem;margin-bottom:1.5rem}
.feature-icon{width:40px;height:40px;border-radius:10px;flex-shrink:0;
    background:rgba(255,106,0,.08);border:1px solid rgba(255,106,0,.15);
    display:flex;align-items:center;justify-content:center;color:#ff6a00}
.feature-icon svg{width:18px;height:18px}
.feature-title{font-size:.95rem;font-weight:600;margin-bottom:.2rem;color:#f5f5f5}
.feature-desc{font-size:.83rem;color:#888;line-height:1.5}
.brand-bottom{position:absolute;bottom:2.5rem;left:4rem;right:4rem;z-index:1;
    display:flex;justify-content:space-between;align-items:center;font-size:.73rem;color:#555}
.brand-bottom .lock{display:flex;align-items:center;gap:.4rem}
.brand-bottom svg{width:12px;height:12px}

/* ============ DASHBOARD ============ */
.sidebar{
    position:fixed;top:0;left:0;width:240px;height:100vh;background:#111;
    border-right:1px solid #1a1a1a;padding:1.5rem;display:flex;flex-direction:column;
    z-index:10;overflow-y:auto;
}
.sidebar-logo{display:flex;flex-direction:column;gap:.6rem;margin-bottom:2.5rem;text-decoration:none}
.sidebar-customer-logo{
    height:48px;width:100%;max-width:180px;
    background-position:left center;background-repeat:no-repeat;background-size:contain;
    filter:invert(1) brightness(1.05);
}
.sidebar-logo .brand{font-size:1.3rem;font-weight:800;letter-spacing:-.02em}
.sidebar-logo .brand .a{color:#f5f5f5}
.sidebar-logo .brand .b{color:#ff6a00}
.sidebar-logo .tag{font-size:.62rem;font-weight:600;color:#555;letter-spacing:.18em;text-transform:uppercase}
.sidebar-section{font-size:.65rem;font-weight:600;color:#555;text-transform:uppercase;
    letter-spacing:.1em;padding:1.25rem .85rem .5rem}
.sidebar-nav{display:flex;flex-direction:column;gap:.15rem}
.sidebar-link{display:flex;align-items:center;gap:.75rem;padding:.65rem .85rem;border-radius:8px;
    color:#888;text-decoration:none;font-size:.85rem;font-weight:500;transition:all .2s;cursor:pointer}
.sidebar-link:hover{background:#1a1a1a;color:#f5f5f5}
.sidebar-link.active{background:rgba(255,106,0,.1);color:#ff6a00}
.sidebar-link svg{width:16px;height:16px;flex-shrink:0}
.sidebar-link .badge{margin-left:auto;background:#ff6a00;color:#0a0a0a;
    font-size:.65rem;font-weight:700;padding:.1rem .4rem;border-radius:10px}
.sidebar-bottom{margin-top:auto;padding-top:1.5rem;border-top:1px solid #1a1a1a}
.user-card{display:flex;align-items:center;gap:.6rem;padding:.5rem .25rem}
.user-avatar{width:36px;height:36px;border-radius:50%;
    background:linear-gradient(135deg,#ff6a00,#ff8c33);display:flex;align-items:center;
    justify-content:center;font-weight:700;color:#0a0a0a;font-size:.9rem;flex-shrink:0}
.user-info{flex:1;min-width:0}
.user-name{font-size:.8rem;font-weight:600;color:#f5f5f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-role{font-size:.7rem;color:#555}
.logout-btn{margin-top:.5rem;width:100%;padding:.5rem;background:transparent;
    border:1px solid #222;border-radius:6px;color:#666;font-family:inherit;
    font-size:.75rem;cursor:pointer;transition:all .2s;text-decoration:none;
    display:block;text-align:center}
.logout-btn:hover{border-color:#ef4444;color:#ef4444}

.main{margin-left:240px;padding:2rem 2.5rem;min-height:100vh}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:2rem}
.topbar h1{font-size:1.5rem;font-weight:700;margin-bottom:.25rem}
.topbar h1 span{color:#ff6a00}
.topbar .crumb{font-size:.75rem;color:#555;letter-spacing:.05em}
.topbar .meta{text-align:right;font-size:.75rem;color:#555}
.topbar .meta strong{color:#888;display:block;font-weight:500}

.welcome-banner{background:linear-gradient(135deg,#161616,#0f0f0f);
    border:1px solid #1a1a1a;border-radius:14px;padding:1.75rem 2rem;
    margin-bottom:2rem;position:relative;overflow:hidden}
.welcome-banner::before{content:'';position:absolute;top:-100px;right:-100px;
    width:300px;height:300px;border-radius:50%;
    background:radial-gradient(circle,rgba(255,106,0,.08),transparent 70%)}
.welcome-banner h2{font-size:1.35rem;font-weight:700;margin-bottom:.4rem;position:relative}
.welcome-banner p{color:#888;font-size:.9rem;position:relative;max-width:680px;line-height:1.55}
.welcome-status{display:inline-flex;align-items:center;gap:.5rem;margin-top:1rem;
    background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.2);
    padding:.35rem .75rem;border-radius:6px;font-size:.78rem;color:#22c55e;position:relative}
.welcome-status .dot{width:8px;height:8px;background:#22c55e;border-radius:50%;animation:pulse 2s infinite}

.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem;margin-bottom:2rem}
.stat-card{background:#111;border:1px solid #1a1a1a;border-radius:12px;
    padding:1.5rem;transition:all .3s}
.stat-card:hover{border-color:rgba(255,106,0,.25);transform:translateY(-2px)}
.stat-icon{width:32px;height:32px;border-radius:8px;background:rgba(255,106,0,.1);
    display:flex;align-items:center;justify-content:center;margin-bottom:1rem;color:#ff6a00}
.stat-icon svg{width:16px;height:16px}
.stat-label{font-size:.7rem;color:#555;text-transform:uppercase;letter-spacing:.08em;margin-bottom:.5rem}
.stat-value{font-size:1.85rem;font-weight:700;color:#fff;line-height:1.1}
.stat-value.small{font-size:1.15rem}
.stat-sub{font-size:.75rem;color:#888;margin-top:.6rem}

.grid-2{display:grid;grid-template-columns:1.4fr 1fr;gap:1.5rem;margin-bottom:1.5rem}
.grid-2.alt{grid-template-columns:1fr 1fr}
.panel{background:#111;border:1px solid #1a1a1a;border-radius:12px;padding:1.5rem}
.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.25rem}
.panel-title{font-size:1rem;font-weight:600}
.panel-action{font-size:.75rem;color:#ff6a00;text-decoration:none;font-weight:500}
.panel-action:hover{text-decoration:underline}

.roadmap{position:relative;padding-left:1.25rem}
.roadmap::before{content:'';position:absolute;left:6px;top:8px;bottom:8px;width:1px;background:#222}
.road-item{position:relative;padding-bottom:1.5rem}
.road-item:last-child{padding-bottom:0}
.road-item::before{content:'';position:absolute;left:-1.25rem;top:4px;
    width:13px;height:13px;border-radius:50%;background:#1a1a1a;border:2px solid #333}
.road-item.done::before{background:#22c55e;border-color:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.15)}
.road-item.active::before{background:#ff6a00;border-color:#ff6a00;
    box-shadow:0 0 0 3px rgba(255,106,0,.2);animation:pulse 2s infinite}
.road-phase{font-size:.68rem;color:#555;text-transform:uppercase;letter-spacing:.1em;margin-bottom:.2rem}
.road-title{font-size:.92rem;font-weight:600;color:#f5f5f5;margin-bottom:.35rem}
.road-desc{font-size:.78rem;color:#777;line-height:1.5;margin-bottom:.5rem}
.road-bar{height:4px;background:#1a1a1a;border-radius:4px;overflow:hidden;max-width:240px}
.road-bar-fill{height:100%;background:linear-gradient(90deg,#ff6a00,#ff8c33);border-radius:4px}

.task-item{display:flex;align-items:flex-start;gap:.85rem;padding:.9rem 0;border-bottom:1px solid #1a1a1a}
.task-item:last-child{border-bottom:none}
.task-check{width:18px;height:18px;border-radius:5px;border:1.5px solid #333;
    flex-shrink:0;margin-top:1px;background:#0a0a0a;cursor:default;transition:all .2s}
.task-check.done{background:#22c55e;border-color:#22c55e}
.task-check.done::after{content:'';display:block;width:5px;height:9px;
    border:solid #0a0a0a;border-width:0 2px 2px 0;transform:rotate(45deg);margin:1px 0 0 5px}
.task-body{flex:1;min-width:0}
.task-title{font-size:.88rem;font-weight:500;color:#f5f5f5;margin-bottom:.2rem;line-height:1.4}
.task-title.done{color:#555;text-decoration:line-through}
.task-meta{display:flex;align-items:center;gap:.6rem;font-size:.72rem;flex-wrap:wrap}
.task-due{color:#888}
.task-due.urgent{color:#ef4444}
.task-tag{padding:.15rem .5rem;border-radius:4px;background:#1a1a1a;color:#888;font-weight:500}
.task-tag.approve{background:rgba(245,158,11,.1);color:#f59e0b}
.task-tag.upload{background:rgba(99,102,241,.1);color:#818cf8}
.task-tag.access{background:rgba(56,189,248,.1);color:#38bdf8}

.doc-item{display:flex;align-items:center;gap:.85rem;padding:.85rem;border-radius:8px;
    transition:background .2s;cursor:pointer;text-decoration:none;color:inherit}
.doc-item:hover{background:#1a1a1a}
.doc-icon{width:36px;height:36px;border-radius:8px;background:#1a1a1a;
    display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#ff6a00}
.doc-icon svg{width:18px;height:18px}
.doc-info{flex:1;min-width:0}
.doc-name{font-size:.85rem;font-weight:500;color:#f5f5f5;margin-bottom:.15rem}
.doc-meta{font-size:.7rem;color:#555}
.doc-action{color:#666}
.empty-state{text-align:center;padding:2rem 1rem;color:#555;font-size:.85rem}

.team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.team-card{display:flex;align-items:center;gap:1rem;padding:1rem;background:#1a1a1a;border-radius:10px}
.team-avatar{width:48px;height:48px;border-radius:50%;
    background:linear-gradient(135deg,#ff6a00,#ff8c33);display:flex;align-items:center;
    justify-content:center;font-weight:700;color:#0a0a0a;font-size:1rem;flex-shrink:0}
.team-info{flex:1;min-width:0}
.team-name{font-size:.9rem;font-weight:600;margin-bottom:.15rem}
.team-role{font-size:.72rem;color:#888;margin-bottom:.4rem}
.team-contact{display:flex;gap:.5rem}
.team-contact a{display:flex;align-items:center;justify-content:center;
    width:28px;height:28px;border-radius:6px;background:#0f0f0f;color:#888;
    text-decoration:none;transition:all .2s}
.team-contact a:hover{color:#ff6a00;background:rgba(255,106,0,.1)}
.team-contact svg{width:13px;height:13px}

/* ============ RESPONSIVE ============ */
@media(max-width:1024px){
    .stats-grid{grid-template-columns:repeat(2,1fr)}
    .grid-2,.grid-2.alt{grid-template-columns:1fr}
}
@media(max-width:980px){
    .shell{grid-template-columns:1fr}
    .brand-side{display:none}
    .form-side{padding:1.75rem 1.5rem}
}
@media(max-width:720px){
    .sidebar{width:60px;padding:1rem .5rem}
    .sidebar-customer-logo{display:none}
    .sidebar-logo .tag,.sidebar-link span,.user-info,.sidebar-section{display:none}
    .sidebar-link{justify-content:center}
    .main{margin-left:60px;padding:1.25rem}
    .stats-grid{grid-template-columns:1fr 1fr;gap:.75rem}
    .topbar{flex-direction:column;gap:1rem}
    .topbar .meta{text-align:left}
}
@media(max-width:480px){
    .form-title{font-size:1.65rem}
}
