:root {
  --bg-dark: #0a0d14;
  --card-bg: #111622;
  --card-border: #1e2638;
  --card-hover: #161e2e;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  padding: 24px;
}

.app-container {
  max-width: 1380px;
  margin: 0 auto;
}

/* Header */
.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 28px;
}

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

.logo-icon {
  font-size: 32px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--card-border);
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.hub-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hub-header .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid transparent;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Grid */
.hub-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}

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

.right-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.card-header h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.flex-1 {
  flex: 1;
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: #090d16;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Type selector chips */
.type-selector {
  display: flex;
  gap: 12px;
}

.radio-chip {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.radio-chip input {
  position: absolute;
  opacity: 0;
}

.radio-chip span {
  display: block;
  text-align: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: #090d16;
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.radio-chip input:checked + span {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: #60a5fa;
}

/* Input presets */
.input-with-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-links {
  display: flex;
  gap: 10px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn-outline-sm {
  background: #0d121d;
  border: 1px solid var(--card-border);
  color: #e2e8f0;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-outline-sm:hover {
  border-color: #475569;
  background: #1e293b;
}

/* Approvals preview chip */
.approval-options-box {
  background: #090d16;
  border: 1px dashed var(--card-border);
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.btn-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.preview-chip {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.btn-approve {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-reject {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }

/* Live Notification Pop-up Area */
.live-notif-area {
  min-height: 120px;
}

.empty-state {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.empty-state-sm {
  text-align: center;
  padding: 18px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Notification Toast Card */
.notif-toast {
  background: linear-gradient(145deg, #131b2e, #0e1422);
  border: 1px solid #2a3754;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(59, 130, 246, 0.2);
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 16px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.notif-toast-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.notif-toast-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.notif-toast-body {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 12px;
}

.notif-toast-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--card-border);
}

.notif-toast-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-action-approve {
  flex: 1;
  background: #059669;
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-action-approve:hover {
  background: #10b981;
}

.btn-action-reject {
  flex: 1;
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-action-reject:hover {
  background: #ef4444;
}

.notif-resolved-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.notif-resolved-approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.notif-resolved-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Device List Cards */
.device-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #090d16;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.device-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.device-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.platform-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #1e293b;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
}
