/* Overview page styles — Enhanced monitoring dashboard */

.overview-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  transition: border-color 0.15s ease;
}
.kpi-pill:hover { border-color: rgba(59, 130, 246, 0.25); }
.kpi-pill .kpi-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.kpi-dot.green { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
.kpi-dot.red { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.kpi-dot.yellow { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.kpi-dot.blue { background: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }

/* Service grid */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.service-card {
  padding: 16px; border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.65);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  position: relative; overflow: hidden;
}
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #64748b, #94a3b8); transition: background 0.2s ease; }
.service-card.is-ok::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.service-card.is-bad::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.service-card.is-warn::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.service-card:hover { border-color: rgba(59, 130, 246, 0.3); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); }
.service-card .service-header { display: flex; align-items: center; gap: 10px; }
.service-card .service-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(59, 130, 246, 0.1); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #3b82f6; flex-shrink: 0; }
.service-card .service-name { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.service-card .service-domain { font-size: 12px; color: #7dd3fc; font-family: "SF Mono", monospace; }
.service-card .service-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; width: fit-content; text-transform: uppercase; letter-spacing: 0.3px; background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); transition: all 0.2s ease; }
.service-card .service-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.service-card.is-ok .service-status { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.25); color: #86efac; }
.service-card.is-ok .service-status .pulse { background: #22c55e; animation: pulse-green 2s infinite; }
.service-card.is-bad .service-status { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.25); color: #fecaca; }
.service-card.is-bad .service-status .pulse { background: #ef4444; }
.service-card.is-warn .service-status { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.25); color: #fde68a; }
.service-card.is-warn .service-status .pulse { background: #f59e0b; }
@keyframes pulse-green { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.service-card .service-note { font-size: 12px; color: #64748b; }
.service-card .service-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.service-card .service-actions .btn { font-size: 11px; padding: 5px 10px; }

/* Quick links */
.quick-links-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-links-grid .btn { font-size: 12px; }

/* ═══════ OFFLINE ALERT CARD ═══════ */
.offline-alert-card {
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.04) !important;
  animation: offline-glow 3s ease-in-out infinite;
}
@keyframes offline-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 20px 0 rgba(239, 68, 68, 0.08); }
}
.offline-alert-card h2 { color: #fca5a5; }
.offline-alert-card h2 ion-icon { color: #ef4444; }
.offline-badge {
  font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px;
  min-width: 20px; text-align: center;
}
.offline-badge.red {
  background: rgba(239, 68, 68, 0.15); color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.offline-badge.green {
  background: rgba(34, 197, 94, 0.15); color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ═══════ ONLINE OK CARD ═══════ */
.online-ok-card {
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  background: rgba(34, 197, 94, 0.04) !important;
}
.online-ok-card h2 { color: #86efac; }
.online-ok-card h2 ion-icon { color: #22c55e; }
.offline-grid { display: flex; flex-direction: column; gap: 8px; }
.offline-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(239, 68, 68, 0.2);
  transition: border-color 0.15s ease;
}
.offline-item:hover { border-color: rgba(239, 68, 68, 0.4); }
.offline-item-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.offline-item-icon.red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.offline-item-icon.yellow { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.offline-item-body { flex: 1; min-width: 0; }
.offline-item-name { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.offline-item-detail { font-size: 11px; color: #64748b; margin-top: 1px; }
.offline-item-status {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0;
}
.offline-item-status.red { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.25); }
.offline-item-status.yellow { background: rgba(245, 158, 11, 0.12); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.25); }

/* ═══════ UPTIME SECTION ═══════ */
.uptime-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.uptime-card {
  padding: 16px; border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}
.uptime-pct { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.uptime-pct.green { color: #22c55e; }
.uptime-pct.yellow { color: #f59e0b; }
.uptime-pct.red { color: #ef4444; }
.uptime-label { font-size: 12px; color: #64748b; margin-top: 2px; }
.uptime-bar { height: 4px; border-radius: 2px; background: rgba(148, 163, 184, 0.15); margin-top: 8px; overflow: hidden; }
.uptime-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.uptime-bar-fill.green { background: #22c55e; }
.uptime-bar-fill.yellow { background: #f59e0b; }
.uptime-bar-fill.red { background: #ef4444; }

/* ═══════ RESPONSE TIMES ═══════ */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.rt-card {
  padding: 14px; border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.rt-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.rt-card.ok::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.rt-card.warn::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.rt-card.bad::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.rt-name { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.rt-ms { font-size: 22px; font-weight: 800; color: #3b82f6; font-variant-numeric: tabular-nums; }
.rt-status { font-size: 11px; color: #64748b; }

/* ═══════ SSL CERTIFICATES ═══════ */
.ssl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ssl-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.ssl-card ion-icon { font-size: 20px; flex-shrink: 0; }
.ssl-card.green ion-icon { color: #22c55e; }
.ssl-card.yellow ion-icon { color: #f59e0b; }
.ssl-card.red ion-icon { color: #ef4444; }
.ssl-domain { font-size: 12px; color: #94a3b8; flex: 1; font-family: "SF Mono", monospace; overflow: hidden; text-overflow: ellipsis; }
.ssl-days { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.ssl-days.green { color: #22c55e; }
.ssl-days.yellow { color: #f59e0b; }
.ssl-days.red { color: #ef4444; }

/* ═══════ DOCKER CONTAINERS ═══════ */
.docker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.docker-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.docker-card ion-icon { font-size: 18px; flex-shrink: 0; }
.docker-card.ok ion-icon { color: #22c55e; }
.docker-card.bad ion-icon { color: #ef4444; }
.docker-name { font-size: 12px; font-weight: 600; color: #e2e8f0; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.docker-status { font-size: 11px; color: #64748b; flex-shrink: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* ═══════ BACKUP ═══════ */
.backup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.backup-item {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: flex; flex-direction: column; gap: 4px;
}
.backup-label { font-size: 11px; color: #64748b; }
.backup-value { font-size: 14px; font-weight: 700; color: #e2e8f0; }

/* ═══════ INCIDENT STATS ═══════ */
.inc-stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.inc-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  min-width: 60px;
}
.inc-stat-num { font-size: 20px; font-weight: 800; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.inc-stat-num.red { color: #ef4444; }
.inc-stat-num.green { color: #22c55e; }
.inc-stat-label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }

/* ═══════ INCIDENT LOG ═══════ */
.incident-count { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.25); }
.incident-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.incident-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(148, 163, 184, 0.12); font-size: 13px; }
.incident-item.active { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.06); }
.incident-item.resolved { border-color: rgba(34, 197, 94, 0.2); }
.incident-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.incident-dot.active { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); animation: pulse-red 2s infinite; }
.incident-dot.resolved { background: #22c55e; }
@keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.incident-time { font-size: 11px; color: #64748b; min-width: 110px; flex-shrink: 0; }
.incident-msg { flex: 1; color: #e2e8f0; font-weight: 500; }
.incident-duration { font-size: 11px; color: #94a3b8; flex-shrink: 0; text-align: right; }

/* ═══════ TREND CHARTS ═══════ */
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.trend-chart {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.5);
}
.trend-chart canvas { width: 100%; height: 80px; display: block; }

/* ═══════ SECTION HEADER ═══════ */
.section-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.section-meta { font-size: 11px; color: #475569; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 768px) {
  .overview-kpi-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .backup-grid { grid-template-columns: repeat(2, 1fr); }
  .docker-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
  .overview-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .uptime-grid { grid-template-columns: 1fr; }
  .rt-grid { grid-template-columns: 1fr; }
  .trend-grid { grid-template-columns: 1fr; }
  .ssl-grid { grid-template-columns: 1fr; }
}

/* ═══════ LIGHT MODE OVERRIDES ═══════ */
.light-mode .kpi-pill {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #171717;
}
.light-mode .kpi-pill:hover { border-color: rgba(37, 99, 235, 0.3); }

.light-mode .service-card {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .service-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.light-mode .service-card .service-name { color: #171717; }
.light-mode .service-card .service-domain { color: #2563eb; }
.light-mode .service-card .service-status {
  background: #f1f5f9;
  color: #737373;
  border-color: #d1d5db;
}
.light-mode .service-card .service-status .pulse { background: #9ca3af; }
.light-mode .service-card.is-ok .service-status {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.2);
  color: #16a34a;
}
.light-mode .service-card.is-ok .service-status .pulse { background: #16a34a; }
.light-mode .service-card.is-bad .service-status {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}
.light-mode .service-card.is-bad .service-status .pulse { background: #dc2626; }
.light-mode .service-card.is-warn .service-status {
  background: rgba(217, 119, 6, 0.06);
  border-color: rgba(217, 119, 6, 0.2);
  color: #d97706;
}
.light-mode .service-card.is-warn .service-status .pulse { background: #d97706; }
.light-mode .service-card .service-note { color: #9ca3af; }
.light-mode .service-card .service-icon { background: rgba(37, 99, 235, 0.06); }

.light-mode .offline-alert-card {
  border-color: rgba(220, 38, 38, 0.3) !important;
  background: rgba(220, 38, 38, 0.03) !important;
}
.light-mode .offline-alert-card h2 { color: #dc2626; }
.light-mode .offline-alert-card h2 ion-icon { color: #dc2626; }
.light-mode .offline-badge.red {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}
.light-mode .offline-badge.green {
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.25);
}
.light-mode .online-ok-card {
  border-color: rgba(22, 163, 74, 0.25) !important;
  background: rgba(22, 163, 74, 0.03) !important;
}
.light-mode .online-ok-card h2 { color: #16a34a; }
.light-mode .online-ok-card h2 ion-icon { color: #16a34a; }
.light-mode .offline-item {
  background: #f8fafc;
  border-color: rgba(220, 38, 38, 0.15);
}
.light-mode .offline-item:hover { border-color: rgba(220, 38, 38, 0.3); }
.light-mode .offline-item-icon.red { background: rgba(220, 38, 38, 0.06); color: #dc2626; }
.light-mode .offline-item-icon.yellow { background: rgba(217, 119, 6, 0.06); color: #d97706; }
.light-mode .offline-item-name { color: #171717; }
.light-mode .offline-item-detail { color: #9ca3af; }
.light-mode .offline-item-status.red {
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.2);
}
.light-mode .offline-item-status.yellow {
  background: rgba(217, 119, 6, 0.06);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.2);
}

.light-mode .uptime-card {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .uptime-label { color: #9ca3af; }
.light-mode .uptime-bar { background: #e5e7eb; }

.light-mode .rt-card {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .rt-name { color: #171717; }
.light-mode .rt-status { color: #9ca3af; }

.light-mode .ssl-card {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .ssl-domain { color: #737373; }

.light-mode .docker-card {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .docker-name { color: #171717; }
.light-mode .docker-status { color: #9ca3af; }

.light-mode .backup-item {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .backup-label { color: #9ca3af; }
.light-mode .backup-value { color: #171717; }

.light-mode .inc-stat {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .inc-stat-num { color: #171717; }
.light-mode .inc-stat-label { color: #9ca3af; }
.light-mode .incident-count {
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.2);
}
.light-mode .incident-item {
  background: #f8fafc;
  border-color: #e5e7eb;
}
.light-mode .incident-item.active {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.03);
}
.light-mode .incident-item.resolved { border-color: rgba(22, 163, 74, 0.2); }
.light-mode .incident-time { color: #9ca3af; }
.light-mode .incident-msg { color: #171717; }
.light-mode .incident-duration { color: #737373; }

.light-mode .trend-chart {
  background: #ffffff;
  border-color: #e5e7eb;
}

.light-mode .section-meta { color: #9ca3af; }

/* ═══════ PLATFORM TILES ═══════ */
.platform-category { margin-bottom: 20px; }
.platform-category:last-child { margin-bottom: 0; }
.platform-category-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: #64748b; margin-bottom: 10px; padding-left: 2px;
}
.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
}
.platform-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.platform-tile:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.platform-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.platform-info { flex: 1; min-width: 0; }
.platform-name { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.platform-url { font-size: 11px; color: #64748b; font-family: "SF Mono", "Fira Code", monospace; margin-top: 1px; }
.platform-arrow { font-size: 16px; color: #475569; flex-shrink: 0; transition: color 0.15s; }
.platform-tile:hover .platform-arrow { color: #3b82f6; }

/* ═══════ ARCHITECTURE DIAGRAM ═══════ */
.arch-diagram {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 20px 0 10px;
}
.arch-layer {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.arch-layer-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: #64748b; margin-bottom: 12px; text-align: center;
}
.arch-nodes {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.arch-nodes.single { justify-content: center; }
.arch-node {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 24px; border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.7);
  min-width: 120px; text-align: center;
}
.arch-node ion-icon { font-size: 24px; margin-bottom: 2px; }
.arch-node span { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.arch-node .arch-sub { font-size: 10px; color: #64748b; font-weight: 400; }
.arch-node.user { border-color: rgba(59, 130, 246, 0.3); }
.arch-node.user ion-icon { color: #3b82f6; }
.arch-node.employee { border-color: rgba(239, 68, 68, 0.3); }
.arch-node.employee ion-icon { color: #ef4444; }
.arch-node.public { border-color: rgba(148, 163, 184, 0.25); }
.arch-node.public ion-icon { color: #94a3b8; }
.arch-node.infra {
  border-color: rgba(34, 197, 94, 0.3); min-width: 280px;
  background: rgba(34, 197, 94, 0.04);
}
.arch-node.infra ion-icon { color: #22c55e; }
.arch-node.backend {
  border-color: rgba(168, 85, 247, 0.3); min-width: 280px;
  background: rgba(168, 85, 247, 0.04);
}
.arch-node.backend ion-icon { color: #a855f7; }
.arch-node.db { border-color: rgba(59, 130, 246, 0.3); }
.arch-node.db ion-icon { color: #3b82f6; }
.arch-node.docker { border-color: rgba(14, 165, 233, 0.3); }
.arch-node.docker ion-icon { color: #0ea5e9; }
.arch-node.pm2 { border-color: rgba(34, 197, 94, 0.3); }
.arch-node.pm2 ion-icon { color: #22c55e; }

/* Connector rows */
.arch-connector-row {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  padding: 8px 0;
}
.arch-connector-row.triple { gap: 48px; }
.arch-branch { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.arch-arrow-down {
  width: 2px; height: 20px;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.4), rgba(148, 163, 184, 0.15));
  position: relative;
}
.arch-arrow-down::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid rgba(148, 163, 184, 0.4);
}
.arch-connector-label {
  font-size: 10px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}

/* App groups */
.arch-app-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.arch-group {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.4);
  overflow: hidden;
}
.arch-group-header {
  padding: 10px 16px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  text-align: center;
}
.arch-group-header.blue { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-bottom: 1px solid rgba(59, 130, 246, 0.15); }
.arch-group-header.red { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border-bottom: 1px solid rgba(239, 68, 68, 0.15); }
.arch-group-header.gray { background: rgba(148, 163, 184, 0.08); color: #94a3b8; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.arch-group-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.arch-group-note {
  padding: 8px 14px; font-size: 11px; color: #475569; line-height: 1.5;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  text-align: center;
}
.arch-group-note strong { color: #64748b; }
.arch-app-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.6);
}
.arch-app-item strong { font-size: 13px; color: #e2e8f0; }
.arch-app-item span { font-size: 11px; color: #64748b; }
.arch-app-item code {
  font-size: 10px; color: #475569; font-family: "SF Mono", "Fira Code", monospace;
  background: rgba(15, 23, 42, 0.5); padding: 3px 8px; border-radius: 6px; margin-top: 4px;
  width: fit-content;
}
.arch-app-item.blue { border-left: 3px solid #3b82f6; }
.arch-app-item.purple { border-left: 3px solid #a855f7; }
.arch-app-item.green { border-left: 3px solid #22c55e; }
.arch-app-item.amber { border-left: 3px solid #f59e0b; }
.arch-app-item.cyan { border-left: 3px solid #0ea5e9; }
.arch-app-item.pink { border-left: 3px solid #ec4899; }
.arch-app-item.red { border-left: 3px solid #ef4444; }
.arch-app-item.gray { border-left: 3px solid #64748b; }
.arch-app-item.indigo { border-left: 3px solid #6366f1; }
.arch-app-item.teal { border-left: 3px solid #14b8a6; }
.arch-app-item.orange { border-left: 3px solid #fb923c; }

/* ═══════ PLATFORM + ARCH — RESPONSIVE ═══════ */
@media (max-width: 768px) {
  .platform-grid { grid-template-columns: 1fr 1fr; }
  .arch-app-groups { grid-template-columns: 1fr; }
  .arch-connector-row { gap: 16px; }
  .arch-connector-row.triple { gap: 24px; }
  .arch-node { min-width: 90px; padding: 10px 14px; }
}
@media (max-width: 600px) {
  .platform-grid { grid-template-columns: 1fr; }
  .arch-nodes { flex-direction: column; align-items: center; }
  .arch-connector-row { flex-direction: column; gap: 4px; }
  .arch-connector-row.triple { flex-direction: column; gap: 4px; }
}

/* ═══════ PLATFORM + ARCH — LIGHT MODE ═══════ */
.light-mode .platform-category-label { color: #9ca3af; }
.light-mode .platform-tile {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .platform-tile:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.light-mode .platform-name { color: #171717; }
.light-mode .platform-url { color: #9ca3af; }
.light-mode .platform-arrow { color: #d1d5db; }
.light-mode .platform-tile:hover .platform-arrow { color: #2563eb; }

.light-mode .arch-layer {
  background: #f8fafc;
  border-color: #e5e7eb;
}
.light-mode .arch-layer-label { color: #9ca3af; }
.light-mode .arch-node {
  background: #ffffff;
  border-color: #e5e7eb;
}
.light-mode .arch-node span { color: #171717; }
.light-mode .arch-node .arch-sub { color: #9ca3af; }
.light-mode .arch-node.infra { background: rgba(22, 163, 74, 0.03); border-color: rgba(22, 163, 74, 0.25); }
.light-mode .arch-node.backend { background: rgba(126, 34, 206, 0.03); border-color: rgba(126, 34, 206, 0.25); }
.light-mode .arch-arrow-down { background: linear-gradient(180deg, #d1d5db, #e5e7eb); }
.light-mode .arch-arrow-down::after { border-top-color: #d1d5db; }
.light-mode .arch-connector-label { color: #9ca3af; }
.light-mode .arch-group { background: #f8fafc; border-color: #e5e7eb; }
.light-mode .arch-group-header.blue { background: rgba(37, 99, 235, 0.05); color: #2563eb; border-color: rgba(37, 99, 235, 0.12); }
.light-mode .arch-group-header.red { background: rgba(220, 38, 38, 0.05); color: #dc2626; border-color: rgba(220, 38, 38, 0.12); }
.light-mode .arch-group-header.gray { background: #f1f5f9; color: #737373; border-color: #e5e7eb; }
.light-mode .arch-group-note { color: #9ca3af; border-color: #e5e7eb; }
.light-mode .arch-group-note strong { color: #737373; }
.light-mode .arch-app-item { background: #ffffff; border-color: #e5e7eb; }
.light-mode .arch-app-item strong { color: #171717; }
.light-mode .arch-app-item span { color: #9ca3af; }
.light-mode .arch-app-item code { background: #f1f5f9; color: #737373; }
