:root {
  --primary: #E84393;
  --primary-dim: rgba(232,67,147,0.12);
  --secondary: #FD79A8;
  --accent: #00CEC9;
  --accent-dim: rgba(0,206,201,0.12);
  --bg: #1A0A14;
  --bg-input: rgba(14,6,10,0.9);
  --border: rgba(232,67,147,0.1);
  --border-hover: rgba(232,67,147,0.2);
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --text-muted: #64748B;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 250ms ease;
  --glass: rgba(26,10,20,0.65);
  --glass-border: rgba(232,67,147,0.08);
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --sev-emerg: #EF4444;
  --sev-alert: #EF4444;
  --sev-crit: #F87171;
  --sev-err: #FB923C;
  --sev-warn: #FBBF24;
  --sev-notice: #22D3EE;
  --sev-info: #10B981;
  --sev-debug: #94A3B8;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.6;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(232,67,147,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(0,206,201,0.03) 0%, transparent 50%);
}
.app { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; min-height: 100vh; }

.header { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.header-left { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.header h1 { font-size: 1.2rem; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-right { display: flex; gap: 6px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm); border: none; font-family: var(--font); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #D63384; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--primary-dim); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; margin-top: 10px; }

.main { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 0; align-items: start; }

.panel { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; animation: fadeIn 0.3s ease; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-header h2 { font-size: 0.88rem; font-weight: 600; }
.panel-body { padding: 16px; flex: 1; overflow-y: auto; max-height: calc(100vh - 160px); }

.input { width: 100%; padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font); font-size: 0.82rem; outline: none; transition: all var(--transition); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.syslog-textarea { min-height: 200px; font-family: var(--mono); font-size: 0.78rem; resize: vertical; line-height: 1.6; }
.empty-msg { font-size: 0.78rem; color: var(--text-muted); }
.msg-count { font-size: 0.78rem; font-weight: 600; color: var(--accent); padding: 3px 10px; background: var(--accent-dim); border-radius: 12px; }

/* Parsed Message Card */
.parsed-list { display: flex; flex-direction: column; gap: 10px; }
.parsed-card { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; animation: fadeIn 0.2s ease; }
.parsed-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-input); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sev-badge { padding: 2px 8px; border-radius: 10px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.fac-badge { padding: 2px 8px; border-radius: 10px; font-size: 0.68rem; font-weight: 600; background: var(--primary-dim); color: var(--primary); }
.rfc-badge { padding: 2px 6px; border-radius: 4px; font-size: 0.64rem; font-weight: 600; background: var(--accent-dim); color: var(--accent); }
.parsed-header .timestamp { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); }
.parsed-body { padding: 10px 12px; }
.field-row { display: flex; gap: 8px; padding: 3px 0; font-size: 0.78rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.field-row:last-child { border-bottom: none; }
.field-label { font-weight: 600; color: var(--text-dim); min-width: 90px; flex-shrink: 0; }
.field-value { font-family: var(--mono); color: var(--text); word-break: break-all; }
.copy-field { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.68rem; margin-left: auto; padding: 2px 4px; flex-shrink: 0; }
.copy-field:hover { color: var(--text); }

.footer { padding: 16px 0; text-align: center; font-size: 0.72rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: auto; }

.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
@media (max-width: 800px) { .main { grid-template-columns: 1fr; } }
