:root{
    --bg:#08111a;
    --panel:#0c1622;
    --soft:#0f1b2b;
    --line:rgba(255,255,255,.08);
    --text:#eef5ff;
    --muted:#95a9c3;
    --primary:#5a9dff;
    --primary2:#7d84ff;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
    font-family:Inter,Arial,sans-serif;
    background:linear-gradient(180deg,#07111a 0%,#08131d 100%);
    color:var(--text);
}

.container{
    max-width:1200px;
    margin:0 auto;
    padding:18px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color:inherit;
}

.brand-badge{
    width:36px;
    height:36px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    background:linear-gradient(135deg,var(--primary),var(--primary2));
}

.brand-copy h2{
    margin:0;
    font-size:18px;
}
.brand-copy p{
    margin:3px 0 0;
    font-size:12px;
    color:var(--muted);
}

.back-link,.btn{
    text-decoration:none;
    border:none;
    border-radius:12px;
    padding:10px 14px;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}

.back-link{
    color:#fff;
    background:#0d1826;
    border:1px solid var(--line);
}

.btn{
    color:#fff;
    background:linear-gradient(135deg,var(--primary),var(--primary2));
}

.layout{
    display:flex;
    gap:18px;
    align-items:flex-start;
}

.sidebar{
    width:320px;
    flex:0 0 320px;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.content{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.card{
    background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.015));
    border:1px solid var(--line);
    border-radius:18px;
    padding:16px;
}

.card h3{
    margin:0 0 10px;
    font-size:16px;
}

.field{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-bottom:12px;
}

.field:last-child{
    margin-bottom:0;
}

label{
    font-size:12px;
    font-weight:700;
}

.input,.select,.textarea{
    width:100%;
    background:#091320;
    color:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    padding:10px 12px;
    font-size:13px;
    outline:none;
}

.textarea{
    min-height:110px;
    resize:vertical;
}

.input:focus,.select:focus,.textarea:focus,.editor-visual:focus{
    border-color:rgba(90,157,255,.45);
    box-shadow:0 0 0 3px rgba(90,157,255,.08);
}

.help{
    font-size:12px;
    color:var(--muted);
    line-height:1.6;
}

.full-btn{
    width:100%;
}

.pill-list{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    border-radius:999px;
    background:#0d1828;
    border:1px solid var(--line);
    font-size:11px;
    font-weight:700;
}

.dynamic-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.dynamic-grid .field.full{
    grid-column:1 / -1;
}

.editor-mode-switch,
.editor-toolbar{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:8px;
}

.editor-tab,
.editor-tool{
    padding:7px 10px;
    font-size:12px;
    border-radius:10px;
    background:#0d1826;
    color:#fff;
    border:1px solid var(--line);
    cursor:pointer;
}

.editor-tab.active{
    background:#10233a;
}

.editor-visual{
    min-height:220px;
    border-radius:12px;
    border:1px solid var(--line);
    background:#091320;
    color:#fff;
    padding:12px;
    line-height:1.7;
    outline:none;
}

@media (max-width: 900px){
    .layout{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        flex:none;
    }

    .content{
        width:100%;
    }

    .dynamic-grid{
        grid-template-columns:1fr;
    }
}