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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  background: #f0f2f5;
  color: #333;
}

/* ─── Логин ─────────────────────────────────────────────────────── */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login-card h2 { text-align: center; color: #1a73e8; }
.login-card input {
  padding: .6rem .8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.login-card button {
  padding: .6rem;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.login-card button:hover { background: #1557b0; }

/* ─── Navbar ──────────────────────────────────────────────────────── */
.navbar {
  background: #1a73e8;
  color: #fff;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-size: 16px; font-weight: 600; }

/* ─── Panel ───────────────────────────────────────────────────────── */
.panel {
  background: #fff;
  margin: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}
.panel-header h3 { font-size: 16px; }

/* ─── Table ───────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem 1.2rem; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 600; color: #666; font-size: 12px; text-transform: uppercase; }
tr:hover td { background: #f8f9ff; }

/* ─── Tabs ────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 1rem 1.5rem .5rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.tab {
  padding: .4rem .9rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 13px;
}
.tab.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }

.tab-content { display: none; padding: 1rem 1.5rem; }
.tab-content.active { display: block; }

/* ─── Data list ───────────────────────────────────────────────────── */
.data-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.data-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: .7rem 1rem;
}
.data-item .ts { font-size: 11px; color: #999; margin-bottom: 4px; }
.data-item .app { font-size: 11px; color: #1a73e8; margin-bottom: 2px; }
.data-item .text { font-size: 13px; line-height: 1.4; word-break: break-word; }

/* ─── Command panel ───────────────────────────────────────────────── */
.command-panel {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}
.command-panel input {
  flex: 1;
  padding: .5rem .8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
button { cursor: pointer; }
.btn-sm {
  padding: .35rem .7rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}
.btn-sm:hover { background: #f5f5f5; }
.btn-primary {
  padding: .4rem .9rem;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
}
.btn-primary:hover { background: #1557b0; }

/* ─── Misc ────────────────────────────────────────────────────────── */
.error { color: #d32f2f; font-size: 13px; text-align: center; }
.badge-online { color: #2e7d32; font-weight: 600; }
.badge-offline { color: #999; }
audio { max-width: 100%; margin-top: 6px; }
