:root{
    --bg:#0e1117;
    --panel:#13171b;
    --muted:#9aa4b2;
    --btn:#238636;
    --accent:#58a6ff;
}

*{box-sizing:border-box}

body{
    margin:0;
    background:var(--bg);
    color:#e6e6e6;
    font-family:system-ui,monospace;
}

/* ===== HEADER ===== */

header{
    padding:10px;
    background:#161b22;
    border-bottom:1px solid #222;
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}

button{
    background:var(--btn);
    border:0;
    color:#fff;
    padding:8px 12px;
    border-radius:6px;
    cursor:pointer;
    font-size:14px;
}

.mobile-toggle{
    display:none;
    background:#30363d;
}

/* ===== LAYOUT DESKTOP ===== */

main{
    display:flex;
    height:calc(100vh - 60px);
}

.tree-panel{
    width:420px;
    padding:10px;
    border-right:1px solid #222;
    overflow:auto;
    background:var(--panel);
}

#content{
    flex:1;
    padding:16px;
    overflow:auto;
}

/* ===== DRZEWO ===== */

.node{
    margin-bottom:6px;
}

.node-header{
    display:flex;
    gap:8px;
    align-items:center;
    padding:6px;
    border-radius:6px;
}

.node-header:hover{
    background:rgba(255,255,255,0.03);
}

.toggle{
    width:20px;
    text-align:center;
    color:var(--muted);
}

.title{
    font-weight:600;
    flex:1;
}

.actions{
    display:flex;
    gap:4px;
}

.actions button{
    background:#30363d;
    padding:4px 6px;
    font-size:12px;
}

.children{
    display:none;
    margin-left:14px;
}

.entry-item{
    padding:6px 8px;
    border-radius:6px;
    cursor:pointer;
    color:var(--muted);
    font-size:14px;
}

.entry-item:hover{
    background:rgba(255,255,255,0.03);
    color:#fff;
}

/* ===== WPIS ===== */

#entryView{
    margin-top:12px;
    padding:14px;
    background:#0b0d12;
    border-radius:8px;
}

pre{
    white-space:pre-wrap;
    line-height:1.5;
}

/* ===== MOBILE ===== */

@media (max-width: 900px){

    main{
        flex-direction:column;
        height:auto;
    }

    .mobile-toggle{
        display:inline-block;
    }

    .tree-panel{
        position:fixed;
        top:60px;
        left:-100%;
        width:85%;
        height:calc(100% - 60px);
        z-index:1000;
        transition:0.3s;
        box-shadow:0 0 20px rgba(0,0,0,0.6);
    }

    .tree-panel.active{
        left:0;
    }

    #content{
        padding:12px;
    }

    button{
        width:100%;
        font-size:16px;
        padding:10px;
    }

    .actions{
        flex-wrap:wrap;
    }

}
:root{
 --bg:#0e1117;
 --panel:#13171b;
 --btn:#238636;
 --muted:#9aa4b2;
}

body{
 margin:0;
 background:var(--bg);
 color:#e6e6e6;
 font-family:system-ui,monospace;
}

header{
 display:flex;
 justify-content:space-between;
 padding:10px;
 background:#161b22;
}

button{
 background:var(--btn);
 border:0;
 padding:8px 12px;
 border-radius:6px;
 color:#fff;
 cursor:pointer;
}

main{
 display:flex;
 height:calc(100vh - 50px);
}

#tree{
 width:320px;
 background:var(--panel);
 overflow:auto;
 padding:10px;
}

#content{
 flex:1;
 padding:20px;
 overflow:auto;
}

.node{
 padding:6px;
 cursor:pointer;
 border-radius:6px;
}

.node:hover{
 background:rgba(255,255,255,0.04);
}

#actionsPanel{
 margin:10px 0;
 display:flex;
 gap:10px;
 flex-wrap:wrap;
}

#sharePanel{
 margin-top:20px;
 padding:10px;
 background:#0b0d12;
 border-radius:8px;
}

input,select{
 width:100%;
 padding:10px;
 margin-bottom:10px;
 background:#0e1117;
 border:1px solid #333;
 color:#fff;
 border-radius:6px;
}

.login-body{
 display:flex;
 align-items:center;
 justify-content:center;
 height:100vh;
}

.login-card{
 background:#13171b;
 padding:30px;
 width:100%;
 max-width:400px;
 border-radius:12px;
}

.error{
 color:#ff7b72;
 margin-bottom:10px;
}

@media (max-width:900px){
 main{
  flex-direction:column;
 }
 #tree{
  width:100%;
  height:200px;
 }
}