*{
    box-sizing:border-box
}

html,
body{
    margin:0;
    padding:0;
    height:100%
}

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,sans-serif;
    background:#0f172a;
    color:#e2e8f0;
    overflow:hidden
}

.app{
    display:flex;
    flex-direction:column;
    height:100vh
}

/*
HEADER
*/
.header{
    height:12%;
    background:#000;
    border-bottom:1px solid #1f2937;

    display:flex;
    align-items:center;

    padding:10px 16px
}

.app-logo{
    width:330px;
    height:200px;
    object-fit:contain;
    margin-right:18px;
    flex-shrink:0
}

.header-text{
    display:flex;
    flex-direction:column;
    justify-content:center
}

.header h2{
    margin:0;
    font-size:26px;
    font-weight:600;
    color:#f8fafc;
    line-height:1.1
}

.header p{
    margin-top:4px;
    margin-bottom:0;
    font-size:18px;
    color:#ddd;
    line-height:1.1
}

/*
FOOTER
*/
.footer{
    height:4%;
    background:#000;
    border-top:1px solid #1f2937;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:18px;
    color:#94a3b8
}

/*
MAIN
*/
.main{
    flex:1;
    display:flex;
    overflow:hidden
}

/*
SIDEBAR
*/
.sidebar{
    width:25%;
    background:#222;
    border-right:1px solid #1e293b;

    display:flex;
    flex-direction:column;

    overflow:hidden
}

.sidebar-top{
    padding:10px;
    border-bottom:1px solid #1e293b;

    display:flex;
    gap:6px
}

/*
GLOBAL BUTTONS
*/
button{
    background:#ccc;
    color:#000;

    border:none;

    padding:5px 8px;

    border-radius:5px;

    cursor:pointer;

    font-size:12px;

    transition:.2s
}

button:hover{
    background:#334155;
    color:#fff
}

/*
TREE
*/
.tree{
    list-style:none;
    padding:10px;
    margin:0;
    flex:1;
    overflow-y:auto;
    font-size:16px
}

.tree li{
    list-style:none;
}

.tree ul{
    list-style:none;
    margin:0;
    padding-left:26px;
    position:relative;
}

/*
Linha vertical
*/
.tree ul::before{
    content:'';

    position:absolute;

    left:8px;
    top:0;
    bottom:0;

    width:1px;

    background:#334155;
    pointer-events:none
}

.tree > ul{
    padding-left:0;
}

/*
NODE
*/
.node{
    display:flex;
    align-items:center;

    min-height:34px;

    padding:3px 6px;

    border-radius:4px;

    transition:.15s
}

.node:hover{
    background:#1e293b;
    cursor:pointer
}

/*
TOGGLE
*/
.toggle{
    width:40px;
    min-width:40px;

    cursor:pointer;

    user-select:none;

    font-size:16px;
    font-family:monospace;

    color:#aaa;

    text-align:center;

    flex-shrink:0
}

/*
TITLE
*/
.title{
    cursor:pointer;
    flex:1;
    color:#ddd;
    user-select:none;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}

/*
TREE ACTIONS
*/
.node-actions{
    display:flex;

    align-items:center;

    gap:3px;

    margin-left:8px;

    opacity:0;

    pointer-events:none;
    position:relative;
    z-index:10;
    transition:opacity .12s ease
}

.node:hover .node-actions{
    opacity:1;

    pointer-events:auto
}

.node-btn{
    width:18px;
    height:18px;

    min-width:18px;

    padding:0;

    border:none;

    border-radius:3px;

    background:#444;

    color:#ddd;

    font-size:10px;

    line-height:1;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

    transition:.12s;

    flex-shrink:0
}

.node-btn:hover{
    background:#666
}

/*
CONTENT
*/
.content{
    flex:1;

    padding:20px;

    overflow-y:auto;

    background:#eee;
    color:#333
}

.content-header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin-bottom:18px
}

.breadcrumb{
    font-size:22px;
    margin:0
}

.content-header-actions{
    display:flex;
    gap:8px
}

.content-add-btn{
    background:#1e293b;
    color:#fff;

    padding:8px 12px;

    border-radius:6px
}



/*
EDITORS
*/
.content-editor,
.tables-editor{
    width:100%;

    min-height:360px;

    padding:12px;

    border:1px solid #ccc;

    border-radius:6px;

    font-size:16px;
    line-height:1.6;

    color:#222;
    background:#fff;

    resize:vertical
}

.tables-editor{
    min-height:120px;
    font-family:monospace
}

.tables-block{
    margin-top:16px
}

/*
MODAL
*/
.modal{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.6);

    display:flex;
    align-items:center;
    justify-content:center;

    z-index:9999
}

.modal.hidden{
    display:none
}

.modal-box{
    width:900px;
    max-width:90vw;

    background:#1e293b;

    border-radius:10px;

    padding:20px;

    color:white
}

.modal-box h3{
    font-size:28px;
    margin-top:0
}

.modal-row{
    display:flex;
    flex-direction:column;

    gap:6px;

    margin-bottom:14px
}

.modal-row textarea{
    min-height:220px;

    padding:10px;

    background:#0f172a;
    color:white;

    border:1px solid #475569;

    border-radius:6px;

    font-size:16px;
    line-height:1.6
}

.modal-row select{
    padding:8px;

    background:#0f172a;
    color:white;

    border:1px solid #475569;

    border-radius:6px
}

.modal-actions{
    display:flex;
    justify-content:flex-end;

    gap:10px
}

#modal-parent-info{
    margin-top:-8px;
    margin-bottom:20px;

    color:#bbb;

    font-size:16px
}

.hidden{
    display:none
}

/*
SCROLLBARS
*/
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar{
    width:6px
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb{
    background:#334155;
    border-radius:3px
}
/*
THEME
*/
#theme-container{
    margin-left:auto;
    text-align:right;
}

#theme-title{
    margin:0;
    font-size:26px;
    font-weight:600;
    color:#f8fafc;
    line-height:1.1;
    text-align: right;
}

#theme-subtitle{

    margin-top:4px;
    margin-bottom:0;
    font-size:18px;
    color:#aaaaaa;
    line-height:1.1;
    text-align: right;
}