/* ── GetTouch Cloud Portal ── */
:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface-hover: #27272a;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-muted: rgba(139, 92, 246, 0.1);
  --green: #10b981;
  --green-muted: rgba(16, 185, 129, 0.1);
  --amber: #f59e0b;
  --amber-muted: rgba(245, 158, 11, 0.1);
  --red: #ef4444;
  --red-muted: rgba(239, 68, 68, 0.1);
  --blue: #3b82f6;
  --blue-muted: rgba(59, 130, 246, 0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ── */
.portal-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand svg { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
}
.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text-secondary);
  background: var(--surface);
}
.nav-link.active {
  color: var(--text);
  background: var(--surface);
}
.nav-external {
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s;
}
.nav-external:hover { color: var(--text-secondary); }

/* ── Page Layout ── */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  width: 100%;
  flex: 1;
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.page-header p {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ── Section ── */
.section {
  margin-bottom: 40px;
}
.section-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header svg {
  color: var(--text-tertiary);
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* ── Service Card ── */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-badge.online { background: var(--green-muted); color: var(--green); }
.status-badge.offline { background: var(--red-muted); color: var(--red); }
.status-badge.pending { background: var(--amber-muted); color: var(--amber); }
.status-badge.internal { background: var(--blue-muted); color: var(--blue); }
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.green { background: var(--green); }
.status-dot.amber { background: var(--amber); }
.status-dot.red { background: var(--red); }
.status-dot.blue { background: var(--blue); }
.service-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.card-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-category {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-arrow {
  color: var(--text-tertiary);
  transition: all 0.2s;
}
.service-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ── Info Card (non-link) ── */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.info-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.info-card .card-desc {
  margin-bottom: 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-tertiary);
}
.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.empty-state p {
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.stat-detail {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── Status List ── */
.status-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.status-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.status-list-item:last-child { border-bottom: none; }
.status-name {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-name .label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
}
.status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Quick Actions ── */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}
.qa-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}
.qa-btn svg { flex-shrink: 0; }

/* ── Footer ── */
.portal-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-external { order: 2; }
  .page-content { padding: 24px 16px 36px; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header h1 { font-size: 20px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
