*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface2: #f9fafb;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
  --topbar: 50px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

/* ── LOGIN ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem; width: 100%; max-width: 360px; box-shadow: var(--shadow); }
.login-logo { font-size: 2rem; text-align: center; margin-bottom: .5rem; color: var(--accent); }
.login-card h1 { text-align: center; font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.login-card .subtitle { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: 1.75rem; }
.alert { padding: .6rem .9rem; border-radius: 7px; font-size: .875rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.alert-ok    { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--success); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea { width: 100%; padding: .55rem .75rem; background: var(--surface); border: 1px solid var(--border2); border-radius: 7px; color: var(--text); font-size: .95rem; outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field textarea { resize: vertical; min-height: 4.5rem; }
.diagnosis-output { white-space: pre-wrap; word-break: break-word; font-size: .9rem; line-height: 1.5; max-height: 60vh; overflow-y: auto; }
.login-card button { width: 100%; margin-top: .5rem; padding: .65rem; background: var(--accent); color: var(--accent-fg); border: none; border-radius: 7px; font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.login-card button:hover { background: #1d4ed8; }

/* ── DASHBOARD ── */
.dashboard-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.topbar { display: flex; align-items: center; justify-content: space-between; height: var(--topbar); padding: 0 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; box-shadow: var(--shadow); }
.topbar-title { font-weight: 700; font-size: .95rem; color: var(--accent); letter-spacing: .01em; }
.topbar-clock { font-size: .8rem; color: var(--muted); flex: 1; text-align: center; letter-spacing: .01em; }
.topbar-user  { font-size: .8rem; color: var(--text); font-weight: 600; margin-right: .5rem; white-space: nowrap; }
.topbar-nav { display: flex; gap: .4rem; align-items: center; }
.btn-icon { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 7px; padding: .3rem .65rem; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.5; transition: color .15s, border-color .15s, background .15s; }
.btn-icon:hover { color: var(--accent); border-color: var(--accent); background: #eff6ff; }

.layout { display: flex; flex: 1; overflow: hidden; }

/* ── LEFT PANEL ── */
.panel-left { width: 45%; min-width: 260px; overflow-y: auto; padding: 1.25rem; flex-shrink: 0; background: var(--bg); }

.section-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; }
.section-title-spaced { margin-top: 1.5rem; }

.cards { display: flex; flex-direction: column; gap: .5rem; }

/* ── GROUP TOGGLE ── */
.card-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.group-toggle { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: none; padding: .75rem 1rem; cursor: pointer; color: var(--text); font-size: .875rem; font-weight: 600; text-align: left; transition: background .15s; }
.group-toggle > span:nth-child(2) { flex: 1; }
.group-toggle:hover { background: var(--surface2); }
.group-chevron { font-size: .65rem; color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.deploy-btn { background: none; border: 1px solid var(--border2); border-radius: 5px; padding: .15rem .45rem; font-size: .75rem; cursor: pointer; color: var(--muted); transition: color .15s, border-color .15s, background .15s; line-height: 1.5; flex-shrink: 0; }
.deploy-btn:hover { color: var(--accent); border-color: var(--accent); background: #eff6ff; }

/* ── DEPLOY-MODAL ── */
.deploy-modal-box { width: min(700px, 95vw); max-height: 80vh; display: flex; flex-direction: column; }
.deploy-log { flex: 1; overflow-y: auto; background: #0d1117; color: #e6edf3; font-family: 'Courier New', monospace; font-size: .8rem; padding: .75rem 1rem; margin: 0; white-space: pre-wrap; word-break: break-all; min-height: 200px; max-height: 50vh; }
.deploy-status { font-size: .85rem; font-weight: 600; }
.deploy-ok  { color: var(--success); }
.deploy-err { color: var(--danger); }
.group-items { border-top: 1px solid var(--border); padding: .5rem; display: flex; flex-direction: column; gap: .35rem; }

.card { display: grid; grid-template-columns: 2rem 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; border: 1px solid var(--border); border-radius: 7px; padding: .6rem .85rem; text-decoration: none; transition: border-color .15s, background .15s; background: var(--surface); }
.card:hover { border-color: var(--accent); background: #eff6ff; }
.card-icon { font-size: 1.1rem; grid-row: 1 / 3; align-self: center; }
.card-name { font-size: .875rem; font-weight: 600; color: var(--text); }
.card-desc { font-size: .75rem; color: var(--muted); }

/* ── DIVIDER ── */
.divider { width: 5px; background: var(--border); cursor: col-resize; flex-shrink: 0; transition: background .15s; }
.divider:hover, .divider:active { background: var(--accent); }

/* ── RIGHT PANEL ── */
.panel-right { flex: 1; display: flex; flex-direction: column; min-width: 300px; background: var(--bg); overflow: hidden; }

/* ── INBOX ── */
#inboxPanel { display: flex; flex-direction: column; flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: .75rem; box-shadow: var(--shadow); overflow: hidden; }

.inbox-header { display: flex; align-items: center; gap: .4rem; padding: .45rem .875rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.inbox-title { font-size: .75rem; font-weight: 700; color: var(--text); }
.inbox-account { font-size: .7rem; color: var(--muted); flex: 1; }
.inbox-badge { background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700; padding: .1rem .4rem; border-radius: 10px; min-width: 18px; text-align: center; display: none; }
.inbox-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: .2rem .5rem; font-size: .8rem; cursor: pointer; text-decoration: none; line-height: 1.6; transition: color .15s, border-color .15s; }
.inbox-btn:hover { color: var(--accent); border-color: var(--accent); }

.inbox-list { overflow: hidden; }
.inbox-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); transition: background .1s; }
.inbox-item:hover { background: var(--surface2); }
.inbox-item.unread { background: #eff6ff; }
.inbox-item.unread:hover { background: #dbeafe; }
.inbox-link { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0 .5rem; padding: .55rem .875rem; flex: 1; min-width: 0; cursor: pointer; }
.inbox-from { font-size: .78rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item.unread .inbox-from { color: var(--accent); }
.inbox-date { font-size: .7rem; color: var(--muted); white-space: nowrap; text-align: right; }
.inbox-subject { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 1 / 3; }
.inbox-item.unread .inbox-subject { color: var(--text); font-weight: 500; }
.inbox-del { flex-shrink: 0; width: 32px; background: none; border: none; border-left: 1px solid transparent; color: var(--muted); cursor: pointer; font-size: .75rem; opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.inbox-item:hover .inbox-del { opacity: 1; }
.inbox-del:hover { color: var(--danger); background: #fef2f2; border-left-color: #fecaca; }
.inbox-loading, .inbox-empty { padding: 1.5rem; text-align: center; font-size: .8rem; color: var(--muted); }
.inbox-error { padding: 1.5rem; text-align: center; font-size: .8rem; color: var(--danger); }

/* ── COMPOSE MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-box { background: var(--surface); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.22); width: 100%; max-width: 480px; display: flex; flex-direction: column; margin: 1rem; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: .2rem .5rem; border-radius: 5px; line-height: 1; }
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-body { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.modal-field { display: flex; flex-direction: column; gap: .3rem; }
.modal-field label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.modal-field input { padding: .5rem .75rem; border: 1px solid var(--border2); border-radius: 7px; font-size: .9rem; color: var(--text); outline: none; background: var(--surface); }
.modal-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
#composeText { height: 160px; padding: .6rem .75rem; border: 1px solid var(--border2); border-radius: 7px; font-size: .9rem; resize: vertical; font-family: inherit; color: var(--text); outline: none; background: var(--surface); }
#composeText:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.modal-footer { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--border); }

/* ── MAIL DETAIL MODAL ── */
.mail-modal-box { max-width: 720px; height: 82vh; }
.mail-subject { font-weight: 600; font-size: .9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: .5rem; }
.mail-meta { padding: .5rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface2); font-size: .78rem; display: flex; flex-direction: column; gap: .2rem; flex-shrink: 0; color: var(--text); }
.mail-meta-label { font-weight: 700; color: var(--muted); display: inline-block; min-width: 3rem; }
.mail-body { flex: 1; overflow: hidden; min-height: 0; }
#mailFrame { width: 100%; height: 100%; border: none; display: block; background: #fff; }
@media (max-width: 767px) { .mail-modal-box { height: 95vh; max-width: 100%; } }

/* ── SSH MODAL ── */
.ssh-modal-box { max-width: 900px; height: 85vh; }
.ssh-body { flex: 1; min-height: 0; background: #1e1e1e; }
.ssh-body iframe { width: 100%; height: 100%; border: none; display: block; }

.inbox-pager { display: flex; flex-wrap: wrap; gap: .3rem; padding: .45rem .875rem; border-top: 1px solid var(--border); background: var(--surface2); }
.pager-btn { background: none; border: 1px solid var(--border2); color: var(--muted); border-radius: 5px; padding: .2rem .55rem; font-size: .75rem; cursor: pointer; min-width: 28px; text-align: center; transition: color .12s, border-color .12s, background .12s; }
.pager-btn:hover { color: var(--accent); border-color: var(--accent); }
.pager-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; cursor: default; }

/* ── KALENDER ── */
#calPanel { display: flex; flex-direction: column; flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 .75rem .75rem; box-shadow: var(--shadow); overflow: hidden; max-height: 260px; }
.cal-header { display: flex; align-items: center; gap: .4rem; padding: .45rem .875rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cal-title { font-size: .75rem; font-weight: 700; color: var(--text); flex: 1; }
.cal-list { overflow-y: auto; }
.cal-group { border-bottom: 1px solid var(--border); }
.cal-group:last-child { border-bottom: none; }
.cal-day { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .3rem .875rem .15rem; background: var(--surface2); }
.cal-day-today { color: var(--accent); background: #eff6ff; }
.cal-item { display: flex; gap: .6rem; align-items: baseline; padding: .3rem .875rem; font-size: .8rem; border-bottom: 1px solid var(--border); }
.cal-item:last-child { border-bottom: none; }
.cal-time { flex-shrink: 0; font-size: .7rem; color: var(--muted); min-width: 3.5rem; font-variant-numeric: tabular-nums; }
.cal-summary { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-loc { color: var(--muted); font-size: .72rem; }

/* ── TERMINAL ── */
#terminalPanel { height: 380px; flex-shrink: 0; display: flex; flex-direction: column; background: #1e1e1e; border-radius: var(--radius); margin: 0 .75rem .75rem; overflow: hidden; box-shadow: var(--shadow); }
.terminal-header { display: flex; align-items: center; gap: .5rem; padding: .45rem 1rem; background: #2d2d2d; border-bottom: 1px solid #444; font-size: .75rem; font-weight: 600; color: #aaa; flex-shrink: 0; }
.terminal-header > span:nth-child(2) { flex: 1; }
.terminal-header .widget-draghandle { color: #aaa; }
.terminal-hint { font-weight: 400; }
.terminal-hint code { background: #3a3a3a; padding: .1rem .35rem; border-radius: 4px; color: #7dd3fc; font-size: .8rem; }
#termFrame { flex: 1; width: 100%; border: none; display: block; }

/* ── AVATAR ── */
.topbar-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--border); flex-shrink: 0; }
.topbar-avatar-ph { width: 28px; height: 28px; border-radius: 50%; background: var(--surface2); border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.user-avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); display: block; }
.user-avatar-ph { display: flex; align-items: center; justify-content: center; font-size: .8rem; background: var(--surface2); }
.avatar-circle { border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface2); border: 2px solid var(--border); flex-shrink: 0; }
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.6rem; }
.avatar-edit-wrap { display: flex; align-items: center; gap: 1rem; padding: .25rem 0; }
.avatar-actions { display: flex; flex-direction: column; gap: .4rem; }
.avatar-pick-label { cursor: pointer; }

/* ── ADMIN PAGES ── */
.admin-page { display: flex; flex-direction: column; min-height: 100vh; }
.admin-wrap { max-width: 900px; margin: 2rem auto; padding: 0 1.5rem; width: 100%; }
.admin-heading { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media(max-width:640px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }

.user-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.user-table th { text-align: left; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .4rem .5rem .75rem; border-bottom: 1px solid var(--border); }
.user-table td { padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.user-table tr:last-child td { border-bottom: none; }
.muted { color: var(--muted); font-size: .8rem; }
.actions { display: flex; gap: .4rem; justify-content: flex-end; }

.user-form { display: flex; flex-direction: column; gap: .9rem; }
.btn-primary { padding: .6rem 1.1rem; background: var(--accent); color: var(--accent-fg); border: none; border-radius: 7px; font-size: .9rem; font-weight: 600; cursor: pointer; align-self: flex-start; transition: background .15s; }
.btn-primary:hover { background: #1d4ed8; }
.btn-sm { display: inline-block; padding: .35rem .7rem; border: 1px solid var(--border2); border-radius: 6px; font-size: .8rem; color: var(--muted); text-decoration: none; cursor: pointer; background: none; transition: color .15s, border-color .15s; }
.btn-sm:hover { color: var(--accent); border-color: var(--accent); }
.btn-danger { border-color: #fca5a5; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }

/* ── LINK-ADMIN ── */
.link-add-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .25rem; }
.link-add-row input[name="icon"]  { width: 3.5rem; text-align: center; flex: none; }
.link-add-row input[name="title"] { flex: 1; min-width: 100px; }
.link-add-row input[name="url"]   { flex: 2; min-width: 140px; }
.link-add-row input { padding: .5rem .65rem; border: 1px solid var(--border2); border-radius: 7px; font-size: .875rem; color: var(--text); outline: none; background: var(--surface); }
.link-add-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* flache Card ohne Toggle (für externe Links / Workbench) */
.card-flat { border-radius: 7px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── RESPONSIVE / MOBILE ── */
@media (max-width: 767px) {
  /* Dashboard: kein festes viewport-height mehr, Seite scrollt normal */
  .dashboard-page { height: auto; min-height: 100vh; overflow: auto; }
  .layout { flex-direction: column; overflow: visible; flex: none; }

  /* Linkes Panel: volle Breite, kein internes Scrollen */
  .panel-left { width: 100% !important; min-width: unset; overflow-y: visible; padding: .75rem; }

  /* Divider verstecken (kein Drag auf Touch-Screens) */
  .divider { display: none !important; }

  /* Rechtes Panel: volle Breite, natürliche Höhe */
  .panel-right { min-width: unset; width: 100%; height: auto; flex-shrink: 0; }
  #inboxPanel { min-height: 280px; }
  #terminalPanel { height: 50vh; }

  /* Größere Touch-Ziele */
  .group-toggle { padding: .9rem 1rem; font-size: .9rem; }
  .card { padding: .75rem 1rem; }
  .card-name { font-size: .9rem; }
  .btn-icon { padding: .45rem .85rem; font-size: 1rem; }
  .topbar { padding: 0 .875rem; }
  .topbar-title { font-size: .9rem; }
}

@media (max-width: 400px) {
  .topbar-title { display: none; }
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --surface2: #263347;
  --border:   #334155;
  --border2:  #475569;
  --accent:   #3b82f6;
  --text:     #f1f5f9;
  --muted:    #94a3b8;
  --danger:   #f87171;
  --success:  #4ade80;
  --shadow:   0 1px 3px rgba(0,0,0,.4);
}
[data-theme="dark"] .inbox-item.unread               { background: #1e3a5f; }
[data-theme="dark"] .inbox-item.unread:hover         { background: #1e3254; }
[data-theme="dark"] .card:hover                      { background: #1e3a5f; }
[data-theme="dark"] .btn-icon:hover                  { background: #1e3a5f; }
[data-theme="dark"] .cal-day-today                   { background: #1e3a5f; }
[data-theme="dark"] .alert-error { background: #3b1515; border-color: #7f1d1d; }
[data-theme="dark"] .alert-ok    { background: #14301e; border-color: #15532e; }
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .modal-field input,
[data-theme="dark"] #composeText,
[data-theme="dark"] .link-add-row input              { background: var(--surface2); }
[data-theme="dark"] #mailFrame                       { background: #f1f5f9; }
[data-theme="dark"] #notesArea                       { background: var(--surface); }

/* ── WETTER (Topbar) ── */
.topbar-weather { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--text); margin-right: .75rem; white-space: nowrap; }
.topbar-weather-icon { font-size: 1rem; line-height: 1; }
.topbar-weather-temp { font-weight: 700; }
.topbar-weather-desc { color: var(--muted); font-size: .72rem; }
@media (max-width: 640px) { .topbar-weather-desc { display: none; } }
@media (max-width: 400px) { .topbar-weather { display: none; } }

/* ── SYSTEM-MONITOR ── */
#sysinfoBar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; padding: .5rem .875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: .75rem .75rem 0; box-shadow: var(--shadow); font-size: .75rem; flex-shrink: 0; }
.si-item { display: flex; gap: .3rem; align-items: center; color: var(--text); white-space: nowrap; }
.si-lbl { font-size: .85rem; }
.si-val { font-variant-numeric: tabular-nums; }
.si-temp-warn { color: #f59e0b; font-weight: 700; }
.si-temp-hot  { color: var(--danger); font-weight: 700; }
.si-loading   { font-size: .75rem; color: var(--muted); }

/* ── DOCKER-DOT ── */
.card { position: relative; }
.docker-dot { position: absolute; top: .45rem; right: .45rem; width: 8px; height: 8px; border-radius: 50%; background: var(--border2); flex-shrink: 0; }
.docker-dot.running { background: var(--success); box-shadow: 0 0 0 2px rgba(22,163,74,.2); }
.docker-dot.stopped { background: var(--danger); }
.docker-dot.paused  { background: #f59e0b; }
.docker-dot-inline  { position: static; flex-shrink: 0; }

/* ── CONTAINER-MANAGER ── */
#containerPanel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: .75rem .75rem 0; box-shadow: var(--shadow); overflow: hidden; flex-shrink: 0; }
.container-header { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.container-title  { font-size: .8rem; font-weight: 700; flex: 1; }
.container-list   { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
.ct-row    { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border-bottom: 1px solid var(--border); font-size: .8rem; }
.ct-row:last-child { border-bottom: none; }
.ct-name   { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-status { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.ct-actions { display: flex; gap: .25rem; flex-shrink: 0; }
.ct-btn    { background: none; border: 1px solid var(--border2); border-radius: 5px; padding: .15rem .4rem; font-size: .8rem; cursor: pointer; color: var(--muted); transition: color .15s, border-color .15s; line-height: 1.4; }
.ct-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.ct-btn:disabled { opacity: .35; cursor: default; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 1.25rem; right: 1.25rem; display: flex; flex-direction: column; gap: .5rem; z-index: 500; max-width: 320px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: .65rem .9rem; font-size: .82rem; color: var(--text); box-shadow: 0 4px 16px rgba(0,0,0,.18); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: var(--danger); }
.toast-ok    { border-left-color: var(--success); }

/* ── SKELETON ── */
.skel { display: block; background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: skel-shine 1.4s ease-in-out infinite; border-radius: 4px; }
@keyframes skel-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-line { height: 9px; }
.skel-circle { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── WIDGETS: DRAG & DROP / SICHTBARKEIT ── */
[data-widget] { transition: opacity .15s; }
[data-widget].dragging { opacity: .4; }
[data-widget].drag-over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.widget-draghandle { cursor: grab; color: var(--muted); font-size: .9rem; line-height: 1; padding: 0 .1rem; user-select: none; flex-shrink: 0; }
.widget-draghandle:active { cursor: grabbing; }
#sysinfoBar { cursor: grab; }
#sysinfoBar:active { cursor: grabbing; }

.widget-menu-wrap { position: relative; }
.widget-menu { position: absolute; top: calc(100% + 6px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: .5rem; display: flex; flex-direction: column; gap: .15rem; min-width: 180px; z-index: 100; }
.widget-menu label { display: flex; align-items: center; gap: .55rem; font-size: .8rem; color: var(--text); cursor: pointer; padding: .35rem .45rem; border-radius: 5px; }
.widget-menu label:hover { background: var(--surface2); }

/* ── DEPLOY-STATUS-DOT ── */
.deploy-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: .35rem; background: var(--border2); vertical-align: middle; }
.deploy-dot.ok  { background: var(--success); }
.deploy-dot.err { background: var(--danger); }

/* ── SCHNELLNOTIZEN ── */
#notesPanel { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 .75rem .75rem; box-shadow: var(--shadow); overflow: hidden; flex-shrink: 0; }
.notes-header { display: flex; align-items: center; gap: .4rem; padding: .45rem .875rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.notes-title { font-size: .75rem; font-weight: 700; color: var(--text); flex: 1; }
.notes-saved { font-size: .68rem; color: var(--success); transition: opacity .3s; }
#notesArea { resize: none; border: none; padding: .6rem .875rem; font-size: .85rem; font-family: inherit; color: var(--text); background: var(--surface); outline: none; height: 110px; line-height: 1.55; }
#notesArea::placeholder { color: var(--muted); }
