/* Modern Premium CSS Stylesheet */

:root {
  /* HSL Color Palette */
  --bg-primary: #09090b;       /* Zinc 950 */
  --bg-secondary: #18181b;     /* Zinc 900 */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f4f4f5;     /* Zinc 100 */
  --text-muted: #a1a1aa;       /* Zinc 400 */
  --text-dark: #71717a;        /* Zinc 500 */
  
  /* Accent Colors */
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.15);
  
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.15);
  
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.15);
  
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.15);
  
  /* Font Families */
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Glow Effects */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
}

.glow-1 {
  width: 40vw;
  height: 40vw;
  background: var(--accent-indigo);
  top: -10vw;
  left: -10vw;
}

.glow-2 {
  width: 35vw;
  height: 35vw;
  background: var(--accent-rose);
  bottom: -5vw;
  right: -5vw;
}

.glow-3 {
  width: 30vw;
  height: 30vw;
  background: var(--accent-emerald);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Glassmorphism Template */
.glass {
  background: rgba(24, 24, 27, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  background: var(--accent-indigo-glow);
  color: var(--accent-indigo);
  padding: 0.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-text h1 span {
  background: linear-gradient(to right, var(--accent-indigo), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.connection-status-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-dark);
}

.status-indicator.active .pulse-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 1.5s infinite;
}

.status-indicator.offline .pulse-dot {
  background-color: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
  animation: pulse 1.5s infinite;
}

.log-source-details {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Config Bar */
.config-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.config-inputs {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-grow: 1;
  flex-wrap: wrap;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
  max-width: 500px;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-with-button input:focus {
  border-color: var(--accent-indigo);
}

.divider {
  color: var(--text-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dropzone-content svg {
  color: var(--accent-indigo);
}

/* Buttons */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
}

.primary-btn {
  background: var(--accent-indigo);
  color: white;
}

.primary-btn:hover {
  background: #4f46e5;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.text-btn {
  background: transparent;
  color: var(--text-muted);
}

.text-btn:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.text-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.metric-card {
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-icon {
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-content h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* Card Themes */
.card-indigo .metric-icon { background: var(--accent-indigo-glow); color: var(--accent-indigo); }
.card-indigo:hover { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); }

.card-emerald .metric-icon { background: var(--accent-emerald-glow); color: var(--accent-emerald); }
.card-emerald:hover { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }

.card-rose .metric-icon { background: var(--accent-rose-glow); color: var(--accent-rose); }
.card-rose:hover { box-shadow: 0 4px 20px rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.2); }

.card-amber .metric-icon { background: var(--accent-amber-glow); color: var(--accent-amber); }
.card-amber:hover { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }

/* Charts Layout */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 1100px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-header {
  display: flex;
  flex-direction: column;
}

.chart-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-container {
  flex-grow: 1;
  position: relative;
}

/* SVG Chart Elements */
svg text {
  fill: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 10px;
}

svg .axis-line {
  stroke: var(--border-color);
  stroke-width: 1;
}

svg .grid-line {
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 1;
  stroke-dasharray: 4,4;
}

/* Timeline specific styles */
.timeline-path-success {
  fill: none;
  stroke: var(--accent-emerald);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-path-failed {
  fill: none;
  stroke: var(--accent-rose);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-area-success {
  fill: url(#success-glow);
  opacity: 0.15;
}

.timeline-area-failed {
  fill: url(#failed-glow);
  opacity: 0.15;
}

.timeline-dot {
  transition: r 0.2s, fill 0.2s;
  cursor: pointer;
}

.timeline-dot:hover {
  r: 6;
}

/* Bar Chart Elements */
.chart-bar {
  rx: 3;
  transition: fill-opacity 0.2s, transform 0.2s;
}

.chart-bar:hover {
  fill-opacity: 0.95;
}

/* Data Section */
.data-section {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.data-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.data-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  width: 260px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent-indigo);
}

.search-box svg {
  color: var(--text-dark);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

.filter-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 8px;
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Table */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Count column numbers */
td:nth-child(2) {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Date column */
td:nth-child(3) {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Username and IP columns */
td:nth-child(4) {
  font-weight: 600;
}

td:nth-child(5) {
  font-family: var(--font-mono);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-failed {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Empty State */
.empty-state td {
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

.empty-state-content svg {
  color: var(--text-dark);
}

.empty-state-content p {
  font-size: 0.9rem;
}

.empty-state-content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* Pagination Footer */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  gap: 0.5rem;
}

/* Tooltip style for SVG */
.chart-tooltip {
  position: absolute;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  pointer-events: none;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  white-space: nowrap;
}

.chart-tooltip-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.chart-tooltip-value {
  font-family: var(--font-mono);
  color: var(--accent-indigo);
}

/* Description Section Styling */
.description-section {
  display: flex;
  padding: 1.5rem 2rem;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.desc-info {
  flex: 2;
  min-width: 300px;
}

.desc-info h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  background: linear-gradient(to right, var(--text-primary), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desc-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.desc-features {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 250px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.feature-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.host-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.client-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.feature-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

