body {
    font-family: Arial, sans-serif;
    background: #eef1f4;
    color: #1f2937;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 4px solid #4b5563;
}

.topbar-left h1 {
    margin: 0;
    font-size: 28px;
}

.seo-text {
    max-width: 600px;
    margin: 10px 0 0;
    color: #5b6472;
    line-height: 1.5;
}

.topbar-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-left: 30px;
}

.page-tabs {
    display: flex;
    align-items: flex-end;
    min-width: 520px;
}

.page-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 42px;
    margin-left: -10px;
    text-decoration: none;
    color: #111827;
    background: #d8dee6;
    border: 4px solid #4b5563;
    border-bottom: none;
    z-index: 1;
}

.page-tab:first-child {
    margin-left: 0;
}

.page-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
    z-index: -1;
}

.page-tab.active {
    background: #ffffff;
    font-weight: bold;
    z-index: 2;
}

.page-tab-filler {
    flex: 1;
    height: 0;
    border-bottom: 4px solid #4b5563;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

button,
input[type="file"] {
    padding: 10px 12px;
    border: 1px solid #cfd6dd;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

.add-bar {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.add-bar input:first-child {
    width: 140px;
}

.add-bar select {
    width: 70px;
}

.add-bar input#newDefault {
    width: 150px;
}

button {
    cursor: pointer;
    color: #111827;
}

button:hover {
    background: #f3f4f6;
}

.main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.left-panel {
    flex: 1;
}

.container {
    display: flex;
    gap: 20px;
}

.container > div {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.right-panel {
    width: 600px;
    flex-shrink: 0;
}

#previewPlaceholder {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

#previewTable {
    max-height: 400px;
    overflow: auto;
    border: 1px solid #d9dee5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#previewTable table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
}

#previewTable th {
    position: sticky;
    top: 0;
    background: #f3f4f6;
    font-weight: bold;
    z-index: 1;
}

#previewTable th,
#previewTable td {
    border: 1px solid #d9dee5;
    padding: 6px 10px;
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
}

#previewTable tr:nth-child(even) {
    background: #fafafa;
}

.column-header {
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.box {
    border: 1px solid #d9dee5;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    height: 400px;
    overflow-y: auto;
}

.box::-webkit-scrollbar {
    width: 6px;
}

.box::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}

.hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.hint.warning {
    color: #c0392b;
}

.item {
    padding: 10px;
    margin-bottom: 6px;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: grab;
}

.controls {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 10px;
    z-index: 10;
    border-bottom: 1px solid #ccc;
}

.drag-handle {
    cursor: grab;
    margin-right: 8px;
    font-weight: bold;
}

.add-group {
    margin-top: 20px;
    padding: 15px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    background: #fafafa;
    max-width: 526px;
}

.add-group h3 {
	margin-bottom: 5px;
}

.add-bar {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-bar input,
.add-bar select,
.add-bar button {
    height: 36px;
    padding: 0 10px;
    box-sizing: border-box;
}

.new-column {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}

h3 {
    margin-bottom: 5px;
    margin-top: 0;
}