:root { --bulma-font-size: 1rem; }
html { font-size: var(--bulma-font-size); }
body { min-height: 100vh; background: #f8f9fa; }
.container.is-fluid { max-width: 100%; padding-left: 1rem; padding-right: 1rem; }
.navbar { border-bottom: 2px solid #2F5496; }

/* === LV Layout === */
.lv-layout { display:flex; align-items:stretch; gap:0; min-height:calc(100vh - 130px); }
.lv-panel { background:#fff; border:1px solid #ddd; border-radius:4px; margin:0 2px; display:flex; flex-direction:column; overflow:hidden; }
.lv-panel.collapsed .panel-body { display:none !important; }
.lv-panel.collapsed .panel-header { border-bottom:none; }
.lv-panel .panel-header { display:flex; align-items:center; justify-content:space-between; background:#f0f2f5; padding:4px 8px; border-bottom:1px solid #ddd; flex-shrink:0; min-height:28px; }
.lv-panel .panel-body { padding:6px; flex:1; overflow-y:auto; }
.lv-panel .panel-actions { white-space:nowrap; display:flex; align-items:center; gap:1px; }
.panel-btn { cursor:pointer; color:#555; font-size:0.8rem; padding:1px 5px; border-radius:2px; line-height:1.4; }
.panel-btn:hover { background:#d0d4dc; color:#222; }
.lv-divider { width:5px; cursor:col-resize; background:#e8e8e8; flex-shrink:0; }
.lv-divider:hover { background:#2F5496; }

/* === Table === */
.table-wrap { overflow-x:auto; }
.table { font-size:0.85rem; table-layout:fixed; }
.table th { white-space:nowrap; position:relative; user-select:none; }
.table th, .table td { padding:4px 10px !important; }
.table th .col-label { cursor:pointer; padding-right:4px; }
.table th .col-label:hover { color:#2F5496; }
.table th .sort-icon { font-size:0.7rem; color:#999; margin-left:2px; }
.table th.sort-asc .sort-icon, .table th.sort-desc .sort-icon { color:#2F5496; }
.table td { vertical-align:middle; }
/* Sticky table header beim Scrollen im LV-Bereich */
#panel-center .panel-header { position:sticky; top:0; z-index:10; }
#lv-table thead { position:sticky; top:0; z-index:5; }
/* Column resize handle */
.col-resize-handle { position:absolute; top:0; right:0; width:10px; height:100%; cursor:col-resize; z-index:2; background:transparent; }
.col-resize-handle::after { content:''; position:absolute; top:0; right:3px; width:4px; height:100%; background:transparent; border-right:2px solid transparent; }
.col-resize-handle:hover::after { background:#2F5496; }
.table th:last-child .col-resize-handle { display:none; }

.drag-handle { cursor:grab; user-select:none; font-size:1.2rem; }
.drag-handle:active { cursor:grabbing; }
.sortable-ghost { opacity:0.4; background:#c8e6c9 !important; }
.sortable-chosen { background:#e3f2fd !important; }

.langtext-preview { font-size:0.8rem; color:#666; line-height:1.3; display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:2.6em; }

.btn-edit { background:#f0c040 !important; border-color:#d4a830 !important; color:#333 !important; }
.btn-edit:hover { background:#e0b030 !important; }
.notification { border-radius:6px; }
.box { border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,0.06); }
.modal-card { border-radius:8px; }
.tag.is-info.is-light { font-size:0.75rem; }

.dropdown-menu { font-size:0.85rem; z-index:100; }
.dropdown-item:hover { background:#f0f2f5; }

/* === Aufmaß Layout === */
#am-divider:hover { background:#2F5496; }
#am-left .lv-item:hover { background:#f0f4ff; }
#am-left .lv-item.is-selected { background:#cfe2ff !important; }

#lv-list .lv-item:hover { background:#f0f4ff; }
#lv-list .lv-item.is-selected { background:#cfe2ff !important; }
#lv-list .lv-item .drag-lv { opacity:0.4; }
#lv-list .lv-item:hover .drag-lv { opacity:1; }

.sortable-ghost { opacity:0.3; background:#c8e6c9 !important; }
.sortable-chosen { background:#e3f2fd !important; }

@media print { .navbar, .lv-divider, .panel-actions { display:none; } }
