/* ─── CSS Variables & Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:      #0a0b0f;
  --bg-surface:   #10121a;
  --bg-elevated:  #161925;
  --bg-card:      #1c2030;
  --bg-card-hover:#202438;
  --border:       rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.10);

  --accent:       #6c63ff;
  --accent-light: #8b83ff;
  --accent-glow:  rgba(108,99,255,0.25);
  --accent-bg:    rgba(108,99,255,0.12);

  --green:        #22d3a5;
  --green-bg:     rgba(34,211,165,0.12);
  --green-glow:   rgba(34,211,165,0.2);
  --red:          #ff5474;
  --red-bg:       rgba(255,84,116,0.12);
  --red-glow:     rgba(255,84,116,0.2);
  --yellow:       #fbbf24;
  --yellow-bg:    rgba(251,191,36,0.12);

  --text-primary:   #f0f2ff;
  --text-secondary: #8892b0;
  --text-muted:     #4a5568;

  --sidebar-w: 240px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
.hidden { display: none !important; }

/* ─── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Auth Screen ─────────────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, rgba(108,99,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(34,211,165,0.06) 0%, transparent 50%),
              var(--bg-base);
}

.auth-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, #6c63ff, transparent); top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: radial-gradient(circle, #22d3a5, transparent); top: 50%; right: -80px; animation-delay: -3s; }
.orb-3 { width: 250px; height: 250px; background: radial-gradient(circle, #ff5474, transparent); bottom: -50px; left: 40%; animation-delay: -6s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px var(--accent-glow);
}
.brand-icon svg { width: 20px; height: 20px; color: white; }

.brand-name {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #f0f2ff, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.auth-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-group input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 5px;
}

.input-wrapper { position: relative; }
.input-wrapper input { padding-right: 44px; }
.toggle-pass {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.2s;
}
.toggle-pass:hover { color: var(--text-secondary); }
.toggle-pass svg { width: 16px; height: 16px; display: block; }

.auth-error {
  background: var(--red-bg);
  border: 1px solid rgba(255,84,116,0.25);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #8b64ff);
  color: white;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 15px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 25px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-light); }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-switch {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 20px;
}
.auth-switch a { color: var(--accent-light); font-weight: 500; transition: color 0.2s; }
.auth-switch a:hover { color: white; }

.demo-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 10px;
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  letter-spacing: 0.01em;
}

/* ─── Dashboard Layout ────────────────────────────────────────────── */
.dashboard {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { color: var(--text-primary); background: var(--bg-elevated); }
.nav-item.active { color: var(--accent-light); background: var(--accent-bg); }

.sidebar-footer {
  padding: 16px 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logout-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--red); background: var(--red-bg); }
.logout-btn svg { width: 16px; height: 16px; display: block; }

/* ─── Main Content ────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.header-left h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.header-left p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.global-stats {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gstat {
  padding: 8px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
  min-width: 60px;
}
.gstat:last-child { border-right: none; }
.gstat span { display: block; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.gstat label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.gstat.up span { color: var(--green); }
.gstat.down span { color: var(--red); }

.btn-add {
  background: linear-gradient(135deg, var(--accent), #8b64ff);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: all 0.2s;
}
.btn-add svg { width: 16px; height: 16px; }
.btn-add:hover { transform: translateY(-1px); box-shadow: 0 8px 25px var(--accent-glow); }

/* ─── Content Section ─────────────────────────────────────────────── */
.content-section {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

/* ─── Filter Bar ──────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active { background: var(--bg-card); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* ─── Monitors Grid ───────────────────────────────────────────────── */
.monitors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.monitor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.monitor-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  transition: opacity 0.2s;
}
.monitor-card.status-up::before { background: var(--green); box-shadow: 0 0 12px var(--green-glow); }
.monitor-card.status-down::before { background: var(--red); box-shadow: 0 0 12px var(--red-glow); }
.monitor-card.status-pending::before { background: var(--yellow); }

.monitor-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.card-url {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.status-badge.up    { background: var(--green-bg); color: var(--green); }
.status-badge.down  { background: var(--red-bg); color: var(--red); }
.status-badge.pending { background: var(--yellow-bg); color: var(--yellow); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.up    { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse-green 2s infinite; }
.status-dot.down  { background: var(--red); box-shadow: 0 0 6px var(--red); animation: pulse-red 2s infinite; }
.status-dot.pending { background: var(--yellow); }

@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50% { opacity: 0.6; box-shadow: 0 0 12px var(--green); }
}
@keyframes pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--red); }
  50% { opacity: 0.6; box-shadow: 0 0 14px var(--red); }
}

.card-stats {
  display: flex;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.card-stat { flex: 1; }
.card-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.card-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.card-last-checked {
  font-size: 12px;
  color: var(--text-muted);
}
.card-delete {
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}
.monitor-card:hover .card-delete { opacity: 1; }
.card-delete:hover { color: var(--red); background: var(--red-bg); }
.card-delete svg { width: 14px; height: 14px; display: block; }

/* ─── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  animation: slideUp 0.5s ease;
}
.empty-icon {
  width: 72px; height: 72px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.empty-icon svg { width: 32px; height: 32px; color: var(--text-muted); }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.empty-state .btn-primary { width: auto; display: inline-flex; padding: 10px 24px; }

/* ─── History Section ─────────────────────────────────────────────── */
.history-header { margin-bottom: 24px; }
.history-header h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.history-header p { color: var(--text-secondary); font-size: 13px; }

.history-list { display: flex; flex-direction: column; gap: 12px; }

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  animation: cardIn 0.3s ease;
}
.history-item-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.history-item-url { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.history-item-times {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.history-time { font-size: 13px; color: var(--text-secondary); }
.history-time strong { color: var(--text-primary); }

.history-duration {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(255,84,116,0.2);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  align-self: center;
}

/* ─── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.modal-large { max-width: 720px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-header h2 { font-size: 17px; font-weight: 700; }

.detail-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-header-info .status-dot { width: 12px; height: 12px; }

.detail-header-actions { display: flex; align-items: center; gap: 8px; }

.modal-close {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-card); }
.modal-close svg { width: 18px; height: 18px; display: block; }

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-footer .btn-primary { width: auto; padding: 10px 22px; }

.required { color: var(--red); }

/* ─── Detail Modal ────────────────────────────────────────────────── */
.detail-url {
  font-size: 13px;
  color: var(--accent-light);
  transition: color 0.2s;
}
.detail-url:hover { color: white; }

.btn-ping {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-ping svg { width: 14px; height: 14px; }
.btn-ping:hover { color: var(--accent-light); border-color: var(--accent); background: var(--accent-bg); }

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.dstat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dstat-icon { font-size: 20px; flex-shrink: 0; width: 28px; text-align: center; }
.status-icon { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.dstat-value { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.dstat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.detail-history h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

.detail-history-list { display: flex; flex-direction: column; gap: 10px; }

.detail-incident {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.incident-reason {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 6px;
}
.incident-times {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.incident-duration {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.incident-duration strong { color: var(--text-secondary); }

.no-incidents {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.no-incidents-icon { font-size: 28px; margin-bottom: 8px; }

/* ─── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(12px) scale(0.95); }
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-brand span, .nav-item span, .user-info, .sidebar-brand .brand-icon + span { display: none; }
  .sidebar-brand { justify-content: center; }
  .nav-item { justify-content: center; }
  .sidebar-footer { justify-content: center; flex-wrap: wrap; }
  .main-content { overflow-x: hidden; }
  .dashboard-header { padding: 16px; flex-wrap: wrap; }
  .content-section { padding: 16px; }
  .monitors-grid { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: repeat(2, 1fr); }
  .global-stats { display: none; }
}

