
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1e1f22;
    color: #dcddde;
    min-height: 100vh;
    display: flex;
  }
  aside {
    width: 240px;
    background: #2b2d31;
    border-right: 1px solid #1e1f22;
    padding: 20px 0;
    flex-shrink: 0;
  }
  .logo {
    padding: 0 20px 20px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #3f4147;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .logo::before {
    content: "";
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4f9eff, #2563eb);
    border-radius: 6px;
  }
  nav { margin-top: 16px; }
  nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #b5bac1;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
  }
  nav a:hover { background: #34363c; color: #fff; }
  nav a.active {
    background: #34363c;
    color: #fff;
    border-left-color: #4f9eff;
  }
  nav a span.icon { width: 18px; text-align: center; }

  main { flex: 1; padding: 24px 32px; overflow-y: auto; }
  header.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  header.topbar h1 { font-size: 22px; font-weight: 600; }
  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2b2d31;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
  }
  .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #23a55a;
    box-shadow: 0 0 8px #23a55a;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }
  .card {
    background: #2b2d31;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #3f4147;
  }
  .card .label {
    color: #b5bac1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .card .value {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-top: 6px;
  }
  .card .sub {
    font-size: 12px;
    color: #80848e;
    margin-top: 4px;
  }

  .panel {
    background: #2b2d31;
    border-radius: 8px;
    border: 1px solid #3f4147;
    margin-bottom: 20px;
    overflow: hidden;
  }
  .panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid #3f4147;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .panel-body { padding: 16px 18px; }

  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #3f4147;
  }
  th { color: #b5bac1; font-weight: 500; font-size: 12px; text-transform: uppercase; }
  tr:last-child td { border-bottom: none; }
  .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
  }
  .badge.online { background: #1e4d2b; color: #4ade80; }
  .badge.away { background: #4d3a1e; color: #fbbf24; }
  .badge.offline { background: #4d1e1e; color: #f87171; }

  .controls { display: flex; gap: 10px; flex-wrap: wrap; }
  button {
    background: #4f9eff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
  }
  button:hover { background: #3b8ce6; }
  button.secondary { background: #3f4147; }
  button.secondary:hover { background: #4d4f55; }
  button.danger { background: #dc2626; }
  button.danger:hover { background: #b91c1c; }

  .form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  .form-row label {
    width: 180px;
    color: #b5bac1;
    font-size: 13px;
  }
  .form-row input, .form-row select {
    flex: 1;
    background: #1e1f22;
    border: 1px solid #3f4147;
    color: #dcddde;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
  }
  .form-row input:focus { border-color: #4f9eff; }

  .channel-list .channel {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }
  .channel-list .channel:hover { background: #34363c; }
  .channel-list .channel .count {
    margin-left: auto;
    font-size: 12px;
    color: #80848e;
  }
  .channel-list .sub { padding-left: 32px; font-size: 13px; color: #b5bac1; }

  .app { display: flex; flex: 1; filter: blur(6px); pointer-events: none; user-select: none; }

  .login-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 100;
    animation: fadeIn 0.4s ease;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  .login-modal {
    background: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 12px;
    padding: 32px;
    width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.4s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .login-modal h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .login-modal h2::before {
    content: "";
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4f9eff, #2563eb);
    border-radius: 6px;
  }
  .login-modal p.subtitle {
    color: #80848e;
    font-size: 13px;
    margin-bottom: 22px;
  }
  .login-modal label {
    display: block;
    color: #b5bac1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    margin-top: 14px;
  }
  .login-modal input {
    width: 100%;
    background: #1e1f22;
    border: 1px solid #3f4147;
    color: #dcddde;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
  }
  .login-modal input:focus { border-color: #4f9eff; }
  .login-modal button {
    width: 100%;
    margin-top: 22px;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
  }
  .login-modal .hint {
    margin-top: 16px;
    text-align: center;
    color: #80848e;
    font-size: 12px;
  }
  .login-modal .error {
    background: #4d1e1e;
    color: #f87171;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 12px;
    display: none;
  }
  .login-modal .error.show { display: block; }

  .live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #23a55a;
    border-radius: 50%;
    margin-left: 6px;
    animation: pulse 1.5s infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

