html, body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

/* ===== Compact MudBlazor Overrides ===== */

/* Icons kleiner */
.mud-icon-root { font-size: 1.15rem !important; }
.mud-icon-size-small { font-size: 0.95rem !important; }
.mud-icon-size-medium { font-size: 1.15rem !important; }
.mud-icon-size-large { font-size: 1.6rem !important; }
.mud-svg-icon { width: 1.15rem; height: 1.15rem; }

/* Nav-Menu kompakter */
.mud-nav-item { padding: 0 !important; }
.mud-nav-link { padding: 4px 12px !important; min-height: 28px !important; font-size: 0.75rem !important; }
.mud-nav-group .mud-nav-link { padding-left: 28px !important; }
.mud-navmenu .mud-collapse-wrapper { margin: 0 !important; }
.mud-list-item { padding-top: 2px !important; padding-bottom: 2px !important; min-height: 28px !important; }
.mud-list-item-text { margin: 0 !important; }

/* Tabellen kompakter */
.mud-table-cell { padding: 4px 10px !important; font-size: 0.72rem !important; }
.mud-table-head .mud-table-cell { padding: 6px 10px !important; font-size: 0.7rem !important; font-weight: 600 !important; }
.mud-table-row { height: auto !important; }

/* Chips kleiner */
.mud-chip { height: 20px !important; font-size: 0.62rem !important; padding: 0 6px !important; }
.mud-chip .mud-chip-content { padding: 0 !important; }
.mud-chip-size-small { height: 18px !important; font-size: 0.58rem !important; }

/* Buttons kompakter */
.mud-button-root { padding: 3px 12px !important; min-height: 28px !important; }
.mud-icon-button { padding: 4px !important; }
.mud-fab-mini { width: 32px !important; height: 32px !important; }

/* Textfelder kompakter */
.mud-input-slot { padding: 6px 10px !important; font-size: 0.72rem !important; }
.mud-input-label { font-size: 0.72rem !important; }
.mud-select .mud-input-slot { padding: 4px 10px !important; }

/* Paper/Cards weniger Padding */
.mud-card-header { padding: 10px 14px !important; }
.mud-card-content { padding: 10px 14px !important; }

/* Timeline kompakter */
.mud-timeline-item { min-height: auto !important; }
.mud-timeline-item-content { padding: 4px 8px !important; }

/* Tabs kompakter */
.mud-tab { min-width: auto !important; padding: 4px 12px !important; font-size: 0.72rem !important; min-height: 32px !important; }

/* Drawer kompakter */
.mud-drawer { width: 200px !important; }
.mud-drawer-open-mini-md-left .mud-main-content { margin-left: 200px !important; }

/* Dialoge */
.mud-dialog .mud-dialog-content { padding: 12px 16px !important; }
.mud-dialog .mud-dialog-actions { padding: 8px 16px !important; }

/* Alerts kompakter */
.mud-alert { padding: 4px 10px !important; font-size: 0.7rem !important; }

/* ===== Login Page ===== */
.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #37474F 0%, #263238 50%, #455A64 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 400px;
    max-width: 90vw;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    color: #FF6D00;
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.login-header p {
    color: #757575;
    font-size: 0.85rem;
    margin: 0;
}

.login-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #424242;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #bdbdbd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: none;
}

.login-field input:focus {
    border-color: #FF6D00;
    box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.15);
}

.login-field input::placeholder {
    color: #bdbdbd;
}

.login-card button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #FF6D00;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.login-card button[type="submit"]:hover {
    background: #E65100;
}

.login-card button[type="submit"]:active {
    background: #BF360C;
}

/* ===== Network Overview ===== */
.nw-grid { display: flex; flex-direction: column; gap: 12px; }
.nw-section { background: #f5f5f5; border-radius: 4px; padding: 8px; border: 1px solid #e0e0e0; }
.nw-section-title { font-size: 0.7rem; font-weight: 600; color: #37474F; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.nw-row { display: flex; flex-wrap: wrap; gap: 6px; }

.nw-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 8px 10px;
    width: 150px; cursor: pointer; transition: all 0.15s; position: relative;
    display: flex; flex-direction: column; gap: 1px;
}
.nw-card:hover { border-color: #FF6D00; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transform: translateY(-1px); }
.nw-card-sm { width: 120px; padding: 5px 7px; }

.nw-card-online { border-left: 3px solid #2e7d32; }
.nw-card-offline { border-left: 3px solid #c62828; background: #fff5f5; }

.nw-card-status { position: absolute; top: 4px; right: 4px; }
.nw-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.nw-dot-online { background: #2e7d32; box-shadow: 0 0 4px rgba(46,125,50,0.5); }
.nw-dot-offline { background: #c62828; }

.nw-card-icon { color: #757575; margin-bottom: 2px; }
.nw-card-icon .mud-icon-root { font-size: 1rem !important; }
.nw-card-name { font-size: 0.68rem; font-weight: 600; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-card-ip { font-size: 0.58rem; color: #FF6D00; font-family: 'Consolas', monospace; }
.nw-card-desc { font-size: 0.55rem; color: #9e9e9e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-card-ping { font-size: 0.55rem; font-family: 'Consolas', monospace; display: flex; gap: 6px; align-items: center; }
.nw-card-lastcheck { color: #bdbdbd; font-size: 0.5rem; }
.nw-card-select { width: 100%; font-size: 0.58rem; padding: 2px 4px; border: 1px solid #e0e0e0; border-radius: 2px; background: #fff; }

/* ===== Document Tree ===== */
.doc-tree-category { border-bottom: 1px solid #e8e8e8; }
.doc-tree-category-header {
    display: flex; align-items: center; padding: 3px 8px; cursor: pointer;
    font-size: 0.7rem; font-weight: 500; color: #424242;
    transition: background 0.15s;
}
.doc-tree-category-header:hover { background: #ececec; }
.doc-tree-category-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.doc-tree-item {
    display: flex; align-items: center; padding: 2px 8px 2px 24px; cursor: pointer;
    transition: background 0.15s; border-left: 2px solid transparent;
}
.doc-tree-item:hover { background: #ececec; }
.doc-tree-item-selected { background: #fff3e0 !important; border-left-color: #FF6D00; }
.doc-tree-item-content { flex: 1; min-width: 0; }
.doc-tree-item-title { font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tree-item-meta { font-size: 0.58rem; color: #9e9e9e; }

/* ===== Markdown Preview ===== */
.markdown-preview {
    line-height: 1.45;
    color: #2a2a2a;
    font-size: 0.75rem;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 3px;
}

.markdown-preview h1 { font-size: 1.2rem; color: #E65100; border-bottom: 2px solid #ddd; padding-bottom: 0.2em; margin-top: 1em; margin-bottom: 0.4em; }
.markdown-preview h2 { font-size: 1rem; color: #37474F; border-bottom: 1px solid #ddd; padding-bottom: 0.15em; margin-top: 0.9em; margin-bottom: 0.3em; }
.markdown-preview h3 { font-size: 0.88rem; color: #424242; margin-top: 0.8em; margin-bottom: 0.2em; }
.markdown-preview p { margin: 0.3em 0; }
.markdown-preview ul, .markdown-preview ol { margin: 0.3em 0; padding-left: 1.4em; }
.markdown-preview li { margin: 0.1em 0; }
.markdown-preview table { border-collapse: collapse; width: 100%; margin: 0.5em 0; font-size: 0.7rem; }
.markdown-preview th, .markdown-preview td { border: 1px solid #ddd; padding: 3px 8px; text-align: left; }
.markdown-preview th { background: #e8e8e8; font-weight: 600; }
.markdown-preview code { background: #e8e8e8; padding: 1px 4px; border-radius: 2px; font-size: 0.85em; }
.markdown-preview pre { background: #e8e8e8; padding: 8px; border-radius: 3px; overflow-x: auto; font-size: 0.7rem; }
.markdown-preview pre code { background: none; padding: 0; }
.markdown-preview blockquote { border-left: 3px solid #FF6D00; margin: 0.5em 0; padding: 0.3em 0.8em; background: #fff3e0; }
.markdown-preview hr { border: none; border-top: 1px solid #ddd; margin: 0.6em 0; }

/* ===== Blazor reconnect UI ===== */
#components-reconnect-modal {
    display: none;
}

#components-reconnect-modal.components-reconnect-show {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
}

#components-reconnect-modal.components-reconnect-show::after {
    content: "Verbindung wird wiederhergestellt...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem 3rem;
    border-radius: 8px;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
